On 2/5/23 08:47, Tomasz Elendt wrote:
The problems start as soon as I change that setup to a single-node Solr cluster
(consisting of only solr1 node) with Zookeeper embedded.
In that case, `create_collection` tries to connect to localhost:9983 (an
address it gets from solr1 Solr I believe). That address of course is not
reachable on the create-collection host:
I checked my single-node cloud that uses the embedded ZK. It's in AWS,
not using Docker. Version is 9.2.0-SNAPSHOT compiled from branch_9x two
days ago.
https://www.dropbox.com/s/361x8ozfnuy018j/solr-zookeeper-address-info.png?dl=0
Solr is using the machine's private IP for ZK, not localhost. I bet
that the /etc/hosts file in the container either has the hostname
assigned to a 127.x.x.x IP address, or doesn't contain the hostname at all.
I don't know that you'll be able to use that third option without
changing what IP address the container gets when Java looks up the local
hostname/address, which is typically done by editing /etc/hosts so the
hostname returns the correct IP address. That is what I do on every
Linux machine that I install. It eliminates a lot of IP addressing
problems.
If ZK is listening on more than localhost, you could use a combination
of `bin/solr zk upconfig` and the fourth option from another
host/container. But it may be better to use one of the first two
options instead.
Thanks,
Shawn