Open zhangddjs opened 4 years ago
I believe you have to set the SOLR_HOST env var to a client accessible hostname, and this should wind up in livenodes in ZK.
okay~ I set the Solr_Host and DNS, then it succeed.
solr4:
image: solr:7.5
container_name: solr4
ports:
- "30008:30008"
environment:
- ZK_HOST=solr-zk1:2181,solr-zk2:2181,solr-zk3:2181
- SOLR_PORT=30008
- SOLR_HOST=dev.covfefe.com
extra_hosts:
- dev.covfefe.com:10.100.13.173
networks:
- solr-cloud
depends_on:
- solr-zk1
- solr-zk2
- solr-zk3
I'm new to this and have been trying to do similar with no luck. How did you know the IP to enter on the right of the extra_hosts statement before the containers come up? That IP is the container IP, right? Then you need to add the dev.covfefe.com host to the network outside of the containers so that your solrj host can resolve it? Thanks.
Nope, that IP is the host's IP, not the container's.
It’s working for me now. Thank you so much!
wel~~
When I try to connect solrCloud with solrJ using host ip, I found that the livenodes' ip is always the containers' ip, obviously, unreachable. How can I connect solrCloud from a remote java client?