gpt4 book ai didi

elasticsearch - es无法写入索引状态,这是由于外力更改了底层文件

转载 作者:行者123 更新时间:2023-12-02 23:15:42 31 4
gpt4 key购买 nike

我意外删除了/home/plog/elk/data/elasticsearch-data路径中的所有文件,然后red中显示了es的健康状态。
我重新启动es守护程序,日志显示找不到文件/home/plog/elk/data/elasticsearch-data/nodes/0/node.lock
然后,我分别在每台服务器上启动es,它可以自动生成node.lock。解决了找不到文件的问题。
但是,es的健康状态仍显示在red中。日志显示failed to write index state,由Underlying file changed by an external force引起。
我怎么解决这个问题
错误日志如下:

[2019-03-25T10:23:32,610][WARN ][o.e.g.MetaStateService   ] [es] [[test_2019.03.10/L3uPPm-vSSW_aG6Qvzih5A]]: failed to write index state
org.apache.lucene.store.AlreadyClosedException: Underlying file changed by an external force at 2019-03-25T02:03:45.489478Z, (lock=NativeFSLock(path=/home/plog/elk/data/elasticsearch-data/nodes/0/node.lock,impl=sun.nio.ch.FileLockImpl[0:9223372036854775807 exclusive valid],creationTime=2019-02-27T08:51:35.409994Z))
at org.apache.lucene.store.NativeFSLockFactory$NativeFSLock.ensureValid(NativeFSLockFactory.java:191) ~[lucene-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:01:13]
at org.elasticsearch.env.NodeEnvironment.assertEnvIsLocked(NodeEnvironment.java:999) ~[elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.env.NodeEnvironment.indexPaths(NodeEnvironment.java:798) ~[elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.gateway.MetaStateService.writeIndex(MetaStateService.java:124) ~[elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.gateway.GatewayMetaState.applyClusterState(GatewayMetaState.java:173) ~[elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.cluster.service.ClusterApplierService.lambda$callClusterStateAppliers$6(ClusterApplierService.java:481) ~[elasticsearch-6.5.4.jar:6.5.4]
at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_202]
at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:478) [elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:465) [elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:416) [elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:160) [elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) [elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:244) [elasticsearch-6.5.4.jar:6.5.4]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:207) [elasticsearch-6.5.4.jar:6.5.4]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_202]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]

最佳答案

解决了。​​我删除了所有索引,然后删除了节点文件夹并重新开始。
查看此博客文章:https://discuss.elastic.co/t/distress-elasticsearch-does-not-start/152288

关于elasticsearch - es无法写入索引状态,这是由于外力更改了底层文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55330873/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com