I encountered a very strange bug when I was deploying a solr cluster as usual。
A previous ephemeral live node st ill exists when I’ve started another solr node via tomcat.
then login to zookeeper find out what happed. The
live_nodes shows me this:
what!!! why its name is like this?? As usual, it should be
realIP:port not local ip.
solr.xml is corrate or not
this line should be var. Thus it will be named your host ip automatically when you star your solr node, registering in zookeeper.
Here’s what I’v found in my case.
step one is right but why am I faild to start my solr node.
The Point is
/etc/hosts, it records
127.0.0.1 xxxxhostnamexxx at the top of this file.
and then at the bottom of this file it records
xxx.xxx.xxx.xxx xxxxhostnamexxx, so I think that node name will be read line by line from top to bottom via tomcat from hosts this file.
Deleting this line
127xxxxxxxx, then restart your nodes.
Logining and checking your node names in live_nodes of zookeeper.
I, simon love this world ❤️