码迷,mamicode.com
首页 > 编程语言 > 详细

ElasticsearchException: java.io.IOException: failed to read [id:0, file:/data/elasticsearch/nodes/0/_state/global-0.st]

时间:2019-11-11 11:11:21      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:exit   als   ted   图片   cut   rom   cte   glob   orm   

from : https://www.cnblogs.com/hixiaowei/p/11213143.html

1.以前装过elasticsearch,重新安装elastic search ,报错

技术图片
[2019-07-19T14:32:10,720][ERROR][o.e.g.GatewayMetaState   ] [master-node] failed to read local state, exiting...
org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:0, file:/data/elasticsearch/nodes/0/_state/global-0.st]
    at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:200) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:304) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.gateway.MetaStateService.loadGlobalState(MetaStateService.java:112) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:56) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:86) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.node.Node.<init>(Node.java:447) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.node.Node.<init>(Node.java:256) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.4.2.jar:6.4.2]
    at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) [elasticsearch-6.4.2.jar:6.4.2]
Caused by: java.io.IOException: failed to read [id:0, file:/data/elasticsearch/nodes/0/_state/global-0.st]
    at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:298) ~[elasticsearch-6.4.2.jar:6.4.2]
    ... 15 more
Caused by: java.lang.IllegalArgumentException: Unexpected field [cluster_uuid_committed]
    at org.elasticsearch.cluster.metadata.MetaData$Builder.fromXContent(MetaData.java:1232) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.cluster.metadata.MetaData$1.fromXContent(MetaData.java:1262) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.cluster.metadata.MetaData$1.fromXContent(MetaData.java:1253) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:196) ~[elasticsearch-6.4.2.jar:6.4.2]
    at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:294) ~[elasticsearch-6.4.2.jar:6.4.2]
    ... 15 more
技术图片

2.删除*.st文件就可以了

find /data*/elasticsearch/data/nodes/0/indices/ | grep state | grep "\.st" | xargs ls -l | awk ‘{if($5==0)print $0}‘

ElasticsearchException: java.io.IOException: failed to read [id:0, file:/data/elasticsearch/nodes/0/_state/global-0.st]

标签:exit   als   ted   图片   cut   rom   cte   glob   orm   

原文地址:https://www.cnblogs.com/shenwenkai/p/11833611.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!