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

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}‘

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

时间: 2024-12-14 02:00:34

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

hadoop错误java.io.IOException Failed to replace a bad datanode on the existing pipeline due to no more good datanodes being available to try

错误: java.io.IOException: Failed to replace a bad datanode on the existing pipeline due to no more good datanodes being available to try 原因: 无法写入:我的环境中有3个datanode,备份数量设置的是3.在写操作时,它会在pipeline中写3个机器.默认replace-datanode-on-failure.policy是DEFAULT,如果系统中的dat

java.io.ioexception failed to mkdirs jenkins xcode || jenkins 无法创建新文件

=========================================================== FATAL: Failed to mkdirs: /Users/chenqing/Sqy/iOSProject/cyou/Svn/Cos/CosXCode_lxh/test-reports java.io.IOException: Failed to mkdirs: /Users/chenqing/Sqy/iOSProject/cyou/Svn/Cos/CosXCode_lxh

Reason: java.io.IOException: Failed to create dir

do: mkdir -p /usr/share/activemq/activemq-data/localhost/KahaDB3 chmod 777 -R /usr/share/activemq/activemq-data/localhost/KahaDB /etc/init.d/activemq start check : netstat -an | grep 61614 tcp        0      0 :::61614                    :::*        

Job Submission failed with exception &#39;java.io.IOException

在hive上执行如下sql: select a.product_id, a.merchant_id, b.category_id from pm_info a join product b on (a.product_id=b.id) where a.is_deleted=0 and a.product_is_gift=0 and a.can_sale=1 and a.can_show=1 and b.is_deleted=0 and b.PRODUCT_IS_GIFT=0; 出现错误,错误如下

Java IO流详解(二)——File类

在上一章博客中简单的介绍了Java IO流的一些特征.也就是对文件的输入输出,既然至始至终都离不开文件,所以Java IO流的使用得从File这个类讲起. File类的描述:File类是文件和目录路径名的抽象表示形式,主要用于文件和目录的创建.查找和删除等操作.即Java中把文件或者目录(文件夹)都封装成File对象.也就是说如果我们要去操作硬盘上的文件或者目录只要创建File这个类即可. 不过要注意的是File类只是对文件的操作类,只能对文件本身进行操作,不能对文件内容进行操作. 1.File

Spakr- ERROR Shell: Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

运行 mport org.apache.log4j.{Level, Logger} import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /** * Created by Lee_Rz on 2017/8/30. */ object SparkDemo { def main(args: Array[String]) { Logger.getLogger("org.apache.spark

Hive报错 Failed with exception java.io.IOException:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:user.name%7D

报错信息如下 Failed with exception java.io.IOException:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:user.name%7D 解决方法: 编辑 hive-site.xml 文件,添加下边的属性 <property> <name>system:java.io.tmpdir<

java.io.IOException: read failed, socket might closed or timeout, read ret: -1

近期项目中连接蓝牙之后接收蓝牙设备发出的指令功能,在连接设备之后,创建RfcommSocket连接时候报java.io.IOException: read failed, socket might closed or timeout, read ret: -1错误.以下说一下我的解决方法,希望对各位有一点帮助. private BluetoothSocket mSocket; <span style="white-space:pre"> </span>priva

关于 java.io.IOException: open failed: EACCES (Permission denied)

今天解决了一个问题,不得不来和大家分享.就是关于 java.io.IOException: open failed: EACCES (Permission denied)的问题,网上也有很多人把这个问题解决了,那么我在这里再重复是不是就是多余的呢?未必哈. 在此,我针对的是,当你用以下这个方法解决不了的时候 在mainfest文件中,增加以下权限: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAG