JanusGraph問題筆記-ResponseException(ES)

問題

E06:使用索引後端elasticsearch啓動時報ResponseException

org.elasticsearch.client.ResponseException: method [GET], host [host1.bigdata:9200] ……node

場景

  • JanusGraph使用hbase-es配置
  • 使用gremlin命令行啓動,執行JanusGraphFactory.open方法時出錯

詳細報錯日誌

15:09:09 WARN  org.janusgraph.diskstorage.es.rest.RestElasticSearchClient  
- Unable to determine Elasticsearch server version. Default to FIVE.
org.elasticsearch.client.ResponseException: method [GET], host [http://host1.bigdata:9200], URI [/], 
status line [HTTP/1.1 503 Service Unavailable]
"cluster_uuid" : "_na_",
Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex
複製代碼

解決方案

  1. 報錯日誌看到http://host1.bigdata:9200的GET訪問不正常,有503服務不可用異常。
  2. 集羣uuid爲_na_,ES集羣狀態不正常,檢查es的日誌,發現es由於沒有足夠的master節點沒正常運行:not enough master nodes discovered during pinging (found
  3. 增長了es的master實例,ES集羣正常運行了。從新運行gremlin,錯誤解決,能夠正常加載圖。

剛開始還覺得是https的問題,這些個錯誤都是JanusGraph使用的索引後端狀態異常引發的,容易走彎路。E05和E06都不是JanusGraph自己的問題,但在實踐中躲不開,權當作個備忘。後端

相關文章
相關標籤/搜索