Collections API timeouts

Such timeout can occur when Solr is not able to obtain cluster state. If following call is results in timeout, then this is the case

http://solr-hostname:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json

This may be caused by incorrect entries present in /clusterstate.json

To fix this:

  • get clusterstate from ZooKeeper by calling

    zkcli.sh -zkhost localhost:2181 -cmd get /clusterstate.json > clusterstate.json
    
  • edit extracted clusterstate.json file and remove sections with wrong IPs or not existing hosts
  • clear the clusterstate in ZooKeeper by calling

    zkcli.sh -zkhost localhost:2181 -cmd clear /clusterstate.json
    
  • save corrected state in ZooKeeper by sending updated JSON file

    zkcli.sh -zkhost localhost:2181 -cmd putfile /clusterstate.json ./clusterstate.json`
    
  • restart Solr instances

After that, if your clusterstate shows correct info, you should no longer have timeouts when accessing Collections API.

Note

Be careful when editing clusterstate JSON, limit your changes only to removing not existing hosts/replicas/shards.

猜你喜欢

转载自jlk.iteye.com/blog/2389490