由于elasticsearch没有找到节点,Sonarqube服务器启动失败

时间:2015-07-29 14:40:04

标签: elasticsearch sonarqube

我正在尝试在Red Hat Enterprise Linux Server 6.4版上启动SonarQube 5.1.2服务器

我的java版本是1.7.0

Althoug我可以在sonar.log中看到弹性搜索节点已启动:

2015.07.29 15:23:07 INFO   es[o.elasticsearch.node]  [sonar-1438179786294] initializing ...
2015.07.29 15:23:07 INFO   es[o.e.plugins]  [sonar-1438179786294] loaded [], sites []
2015.07.29 15:23:10 INFO   es[o.elasticsearch.node]  [sonar-1438179786294] initialized
2015.07.29 15:23:10 INFO   es[o.elasticsearch.node]  [sonar-1438179786294] starting ...
2015.07.29 15:23:10 INFO   es[o.e.transport]  [sonar-1438179786294] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[localhost/127.0.0.1:9001]}

由于NodeDisconnectedException导致索引规则时无法启动:

java.lang.IllegalStateException: Fail to execute Bulk[249 index request(s) on index rules and type rule, 35 update request(s) on index rules and type rule]
        at org.sonar.server.es.request.ProxyBulkRequestBuilder.get(ProxyBulkRequestBuilder.java:51) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.es.request.ProxyBulkRequestBuilder.get(ProxyBulkRequestBuilder.java:39) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.search.IndexQueue.enqueue(IndexQueue.java:86) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.core.persistence.DbSession.commit(DbSession.java:62) ~[sonar-core-5.1.2.jar:na]
        at org.sonar.server.db.BaseDao.synchronizeAfter(BaseDao.java:370) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.db.BaseDao.synchronizeAfter(BaseDao.java:361) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.search.IndexSynchronizer.synchronize(IndexSynchronizer.java:106) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.search.IndexSynchronizer.executeDeprecated(IndexSynchronizer.java:73) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.platform.ServerComponents$1.doPrivileged(ServerComponents.java:850) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:43) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.platform.ServerComponents.executeStartupTasks(ServerComponents.java:847) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:126) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:122) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.platform.Platform.doStart(Platform.java:81) ~[sonar-server-5.1.2.jar:na]
        at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-5.1.2.jar:na]
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [tomcat-embed-core-8.0.18.jar:8.0.18]
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [tomcat-embed-core-8.0.18.jar:8.0.18]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.18.jar:8.0.18]
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.0.18.jar:8.0.18]
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [tomcat-embed-core-8.0.18.jar:8.0.18]
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.7.0]
        at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0]
2015.07.29 15:23:33 INFO  app[o.s.p.m.TerminatorThread] Process[web] is stopping
        at java.lang.Thread.run(Unknown Source) [na:1.7.0]
Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes were available: [[sonar-1438179786294][nhSNyQyhRnWN61jc3hqFDw][inet[/127.0.0.1:9001]]{rack_id=sonar-1438179786294}]
        at org.elasticsearch.client.transport.TransportClientNodesService$RetryListener.onFailure(TransportClientNodesService.java:234) ~[elasticsearch-1.4.4.jar:na]
        at org.elasticsearch.action.TransportActionNodeProxy$1.handleException(TransportActionNodeProxy.java:78) ~[elasticsearch-1.4.4.jar:na]
        at org.elasticsearch.transport.TransportService$Adapter$3.run(TransportService.java:323) ~[elasticsearch-1.4.4.jar:na]
        ... 3 common frames omitted
Caused by: org.elasticsearch.transport.NodeDisconnectedException: [sonar-1438179786294][inet[/127.0.0.1:9001]][indices:data/write/bulk] disconnected

我已经为sonar.properties尝试了几种值组合,但它们似乎都不起作用:

sonar.search.javaAdditionalOpts=-Des.network.host=localhost

sonar.search.host=127.0.0.1

我已经禁用了防火墙并删除了/ data / es文件夹但没有运气并搜索了类似的问题,但无法找到除弹性搜索无法找到已定义节点之外的问题。< / p>

有没有人有类似的问题?

1 个答案:

答案 0 :(得分:1)

感谢您的关注,我终于设法找到并解决了问题。默认情况下在RHEL 6.4中安装的JRE版本是1.7.0,并且似乎存在与该版本相关的某种错误。我将JRE的版本更新到最后一个版本(java 8),它开始很好