来自:Elasticsearch failed to recover after crash和Delete a project from SonarQube
我删除了一个项目然后转到cli并重新启动,现在它已经与之相关:
2015.05.08 15:10:57 INFO es[o.s.p.ProcessEntryPoint] Starting search
2015.05.08 15:10:57 INFO es[o.s.s.SearchServer] Starting Elasticsearch[sonarqube] on port 9001
2015.05.08 15:10:58 INFO es[o.elasticsearch.node] [sonar-1431061857323] version[1.4.4], pid[6991], build[c88f77f/2015-02-19T13:05:36Z]
2015.05.08 15:10:58 INFO es[o.elasticsearch.node] [sonar-1431061857323] initializing ...
2015.05.08 15:10:58 INFO es[o.e.plugins] [sonar-1431061857323] loaded [], sites []
2015.05.08 15:10:59 INFO es[o.elasticsearch.node] [sonar-1431061857323] initialized
2015.05.08 15:10:59 INFO es[o.elasticsearch.node] [sonar-1431061857323] starting ...
2015.05.08 15:11:00 INFO es[o.e.transport] [sonar-1431061857323] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/192.168.78.76:9001]}
2015.05.08 15:11:00 INFO es[o.e.discovery] [sonar-1431061857323] sonarqube/KkVXWlQCRLGbdSgJZT90uA
2015.05.08 15:11:03 INFO es[o.e.cluster.service] [sonar-1431061857323] new_master [sonar-1431061857323][KkVXWlQCRLGbdSgJZT90uA][java-ci.gbst.net][inet[/192.168.78.76:9001]]{rack_id=sonar-1431061857323}, reason: zen-disco-join (elected_as_master)
2015.05.08 15:11:03 INFO es[o.elasticsearch.node] [sonar-1431061857323] started
2015.05.08 15:11:04 INFO es[o.e.gateway] [sonar-1431061857323] recovered [6] indices into cluster_state
2015.05.08 15:11:45 WARN es[o.e.indices.cluster] [sonar-1431061857323] [sourcelines][0] failed to start shard
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [sourcelines][0] failed to recover shard
at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:287) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132) ~[elasticsearch-1.4.4.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: org.elasticsearch.index.translog.TranslogCorruptedException: translog corruption while reading from stream
at org.elasticsearch.index.translog.ChecksummedTranslogStream.read(ChecksummedTranslogStream.java:70) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:257) ~[elasticsearch-1.4.4.jar:na]
... 4 common frames omitted
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: No version type match [34]
at org.elasticsearch.index.VersionType.fromValue(VersionType.java:307) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.index.translog.Translog$Create.readFrom(Translog.java:374) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.index.translog.ChecksummedTranslogStream.read(ChecksummedTranslogStream.java:68) ~[elasticsearch-1.4.4.jar:na]
... 5 common frames omitted
2015.05.08 15:11:45 WARN es[o.e.c.action.shard] [sonar-1431061857323] [sourcelines][0] sending failed shard for [sourcelines][0], node[KkVXWlQCRLGbdSgJZT90uA], [P], s[INITIALIZING], indexUUID [PPjSIrsGT4SmdwDQigKHgA], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[sourcelines][0] failed to recover shard]; nested: TranslogCorruptedException[translog corruption while reading from stream]; nested: ElasticsearchIllegalArgumentException[No version type match [34]]; ]]
2015.05.08 15:11:45 WARN es[o.e.c.action.shard] [sonar-1431061857323] [sourcelines][0] received shard failed for [sourcelines][0], node[KkVXWlQCRLGbdSgJZT90uA], [P], s[INITIALIZING], indexUUID [PPjSIrsGT4SmdwDQigKHgA], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[sourcelines][0] failed to recover shard]; nested: TranslogCorruptedException[translog corruption while reading from stream]; nested: ElasticsearchIllegalArgumentException[No version type match [34]]; ]]
我怎样才能重新启动。一些我需要清理translog但我似乎无法找到我怎么做。
编辑:我删除了非零translog文件并重新启动并且它给出了相同的错误并再次重新创建了17B translog文件。所以这没有帮助。
由于 赛
答案 0 :(得分:9)
嵌入式ElasticSearch索引似乎已损坏。您必须停止服务器,删除目录$SQ_HOME/data/es
的内容并重新启动服务器。这应该构建ES索引干净。