Re: Shard replica labels in Solr Admin graph?
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
Re: Shard replica labels in Solr Admin graph?
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 127.0.1.1 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. Cheers, ...scott 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 "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
Re: Shard replica labels in Solr Admin graph?
On 3/2/2018 12:51 PM, Scott Prentice wrote: > 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 127.0.1.1 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. I know that if you set up a manual IP address during install, and choose correct hostname/domain values, that Ubuntu/Debian should do the right thing with regard to /etc/hosts. But there are situations in which those operating systems will use 127.0.1.1. I am not aware of what situations those are ... maybe if you let it use DHCP during install? I never do that. https://serverfault.com/a/363098 Thanks, Shawn