`
JLK
  • 浏览: 232625 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Collections API timeouts

    博客分类:
  • solr
 
阅读更多

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.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics