title: Sonarqube server fails on start due to elasticsearch not finding nodes
body: <p>I'm trying to start SonarQube 5.1.2 server on a Red Hat Enterprise Linux Server release 6.4</p>
  
  <p>My java version is 1.7.0</p>
  
  <p>Althoug I can see in the sonar.log that the elasticsearch node is started:</p>
  
  <pre><code>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]}
  </code></pre>
  
  <p>it fails to start while indexing rules due to a NodeDisconnectedException:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I've tried several combinations of values for sonar.properties but none of them seemed to work:</p>
  
  <pre><code>sonar.search.javaAdditionalOpts=-Des.network.host=localhost
  
  sonar.search.host=127.0.0.1
  </code></pre>
  
  <p>I've disabled the firewall and removed the /data/es folder with no luck and searched for a similar problem but was not able to find what the problem could be apart from elasticsearch not being able to find the defined node.</p>
  
  <p>Has anyone had a similar problem?</p>