Thanks Shawn!

I made the adjustment to /etc/hosts, and now all's well. This also fixed an underlying problem that I hadn't noticed at the time I send my query .. that only one Solr server was actually running. Turns out that Zookeeper saw them all as and didn't let the other instances fully start up.

These were brand new, fresh, Ubuntu installs. Strange that the /etc/hosts isn't set up to handle this.


On 2/28/18 8:48 PM, Shawn Heisey wrote:
On 2/28/2018 5:42 PM, Scott Prentice wrote:
We initially tested our Solr Cloud implementation on a single VM with 3 Solr servers and 3 Zookeeper servers. Once that seemed good, we moved to 3 VMs with 1 Solr/Zookeeper on each. That's all looking good, but in the Solr Admin > Cloud > Graph, all of my shard replicas are on "" .. with the single VM setup it listed the port number so you could tell which "server" it was on.

Is there some way to get the shard replicas to list with the actual IPs of the server that the replica is on, rather than

That is not going to work if those are separate machines.

There are two ways to fix this.

One is to figure out why Java is choosing a loopback address when it attempts to detect the machine's hostname.  I'm almost certain that /etc/hosts is set up incorrectly.  In my opinion, a typical /etc/hosts file should have two IPv4 lines, one defining localhost as, and another defining the machine's actual IP address as both the fully qualified domain name and the short hostname. An example:       localhost    smeagol

The machine's hostname should not be found on any line that does not have a real IP address on it.

The other way to solve the problem is to specify the "host" system property to override Java's detection of the machine address/hostname.  You can either add a commandline option to set the property, or add it to solr.xml.  Note that if your solr.xml file is in zookeeper, then you can't use solr.xml.  This is because with solr.xml in zookeeper, every machine would have the same host definition, and that won't work.


Reply via email to