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
"127.0.1.1" .. 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 127.0.1.1?
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 127.0.0.1,
and another defining the machine's actual IP address as both the fully
qualified domain name and the short hostname. An example:
127.0.0.1 localhost
192.168.1.200 smeagol.REDACTED.com 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.
https://lucene.apache.org/solr/guide/6_6/format-of-solr-xml.html#the-code-solrcloud-code-element
Thanks,
Shawn