Skip to content

Apache Lucene open-source search software

SOLR-14751: Zookeeper Admin screen not working for old ZK versions

Jan Høydahlbed3b8fbfbc5
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0d815c6e076..a6e64e14438 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -180,6 +180,8 @@ Bug Fixes
* SOLR-14748: Fix incorrect auth/SSL startup logging (Jason Gerlowski)
+* SOLR-14751: Zookeeper Admin screen not working for old ZK versions (janhoy)
+
Other Changes
---------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
index 051870d6fe8..1ac21fe5d9e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
@@ -761,6 +761,9 @@ public class SolrZkClient implements Closeable {
return "";
}
return new String(data, StandardCharsets.UTF_8);
+ } catch (NoNodeException nne) {
+ log.debug("Zookeeper does not have the /zookeeper/config znode, assuming old ZK version");
+ return "";
} catch (KeeperException|InterruptedException ex) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Failed to get config from zookeeper", ex);
}