On 6/11/2018 6:41 AM, Anil wrote:
I was trying solrcloud cluster setup using solr 7.3.1 and it is up. Admin
console looks good and queries in console are working fine. But solrj
connection failing with following exception
org.apache.solr.common.SolrException: Cannot connect to cluster at
127.0.0.1:2181/solr : cluster not found/not ready
at
org.apache.solr.common.cloud.ZkStateReader.createClusterStateWatchersAndUpdate(ZkStateReader.java:376)
~[solr-solrj-6.6.3.jar:6.6.3 d1e9bbd333ea55cfa0c75d324424606e857a775b -
sarowe - 2018-03-02 15:09:35]
If you're running Solr 7.3.1, then you should be using SolrJ 7.3.x, not
6.6.3. SolrCloud is evolving so rapidly that differences in version
between these two components, especially when SolrJ is older, are not
likely to work. This doesn't appear to be the cause of the specific
error you are seeing, but assuming you can get past this error, it might
lead to other problems.
solr is not updating the cluster status in clusterstate.json and it is
empty and created state.json under each collection.
https://issues.apache.org/jira/browse/SOLR-5473
Can you please point out the issue here ? Thanks.
Recent versions of SolrCloud may not put any data in clusterstate.json,
but this file is still used for cluster coordination, through ZK watches
on the clusterstate.json znode. I do not know the details of how this works.
Looking into the code, it appears that this error is saying that
/clusterstate.json does not exist in zookeeper. This znode must exist.
Since Solr creates that znode when it starts, I think there are two
possible reasons for this error. 1) The Solr client is being started
with a different zkHost value than the servers, so it is not finding the
information written by the servers. 2) You are intentionally deleting
the /clusterstate.json znode from zookeeper.
Thanks,
Shawn