Sonar 启动时出现 Elasticsearch 批量索引错误

Elasticsearch bulk index error on Sonar startup

有人可以帮助解决以下错误吗?它发生在 Java 8u71 和 Oracle 数据库上的 SonarQube 5.6 运行 启动时。此实例刚刚从 5.2 更新。我有 Puppet 插件并将其卸载以尝试解决错误。我确认启动后 Elasticsearch 在端口 9001 上。

2016.06.13 00:16:04 ERROR web[o.s.s.es.BulkIndexer] Fail to execute bulk index request: Bulk[671 index request(s) on index rules and type activeRule]
org.elasticsearch.transport.RemoteTransportException: [sonar-1465791343547][inet[/127.0.0.1:9001]][indices:data/write/bulk]
Caused by: org.elasticsearch.index.mapper.MapperParsingException: The provided routing value [puppet] doesn't match the routing key stored in the document: [puppet:ArrowsAlignment]
        at org.elasticsearch.action.index.IndexRequest.process(IndexRequest.java:577) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(TransportBulkAction.java:236) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:167) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:67) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.action.support.HandledTransportAction$TransportHandler.messageReceived(HandledTransportAction.java:63) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.action.support.HandledTransportAction$TransportHandler.messageReceived(HandledTransportAction.java:51) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:222) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:114) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.5.jar:na]
        at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.5.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_71]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_71]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_71]

此错误已在 6.0 版中修复。同时,您应该删除目录 $SONAR_HOME/data/es/ 并重新启动服务器。希望对您有所帮助。