Hi, I have looked the zookeeper code and confirmed with the ZK people. What I found was that the ZKclient does indeed resolve multiple IPs from a single address, however, solr only reports one of them.
I have dug deeper and found out that fortunately this only affects the solr webapp and not the core. This is a cosmetic issue in getZkStatus() of ZookeeperStatusHandler.java as it takes the raw ZK_HOST string and splits it to get the ensemble size. Then loops through this array to get the info. This results in: Status: red Errors: "Leader reports 2 followers, but we only found 0. Please check zkHost configuration"; "We do not have a leader" (either one) ZK connection string: solr-zookeeper-headless:2181 Ensemble size: 1 FYI, solr-zookeeper-headless resolves to 3 different IPs. And getZkRawResponse() method only connects to 1 of the 3. My suggestion is the following: - List<String> zookeepers = Arrays.asList(zkHost.split("/")[0].split(",")); + List<String> zookeeperHosts = Arrays.asList(zkHost.split("/")[0].split(",")); + final List<String> zookeepers = new ArrayList<>(); + for (String host : zookeeperHosts) { + // resolve host and add all IP:port to zookeepers array + } Let me know your thoughts. On 26/9/19, 9:47 PM, "LEE Ween Jiann" <wjlee.2...@phdcs.smu.edu.sg> wrote: Thank you, this is what I needed to know. On 26/9/19, 9:08 PM, "Shawn Heisey" <apa...@elyograg.org> wrote: On 9/26/2019 4:12 AM, LEE Ween Jiann wrote: > I'm trying to modify the helm chart for solr such that it works for kubernetes (k8s) deployment correctly. There needs to be a particular change in the way solr resolves zookeepers hostname in order for this to happen. This is the solr-user mailing list. Your question is about ZooKeeper. Solr uses the ZK client without any modifications. It passes the zkHost string to ZK and ZK handles it. Solr does not interpret that string -- it is ZK that is looking up the hosts, not Solr. You're going to need to ask ZK folks this question. Thanks, Shawn