【ElasticSearch錯誤】SERVICE_UNAVAILABLE/1/state not recovered


ES裝好后,輸入curl localhost:9200無錯,從遠程訪問也OK,但創建文檔時出錯......

[hy@localhost ~]$ curl -H "Content-Type: application/json" -XPUT 'localhost:9200/moft/emp/1?pretty' -d' {"name":"...","age":"21","salary":"10000","hdate":"2002-1-1T12:12:12","title":".."}'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "cluster_block_exception",
        "reason" : "blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized, SERVICE_UNAVAILABLE/2/no master];",
        "suppressed" : [
          {
            "type" : "master_not_discovered_exception",
            "reason" : null
          }
        ]
      }
    ],
    "type" : "cluster_block_exception",
    "reason" : "blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized, SERVICE_UNAVAILABLE/2/no master];",
    "suppressed" : [
      {
        "type" : "master_not_discovered_exception",
        "reason" : null
      }
    ]
  },
  "status" : 503
}
[hy@localhost ~]$ 

經查明,出現此錯是因為cluster.initial_master_nodes和node.name不匹配所致,單機單實例請參考:https://www.cnblogs.com/heyang78/p/15922514.html

 

END


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM