title: SonarQube - Elasticsearch could not bind
body: <p>Last week SonarQube loaded in, worked nice and dandy. Now it throws this warning in <code>sonar.log</code>:</p>
  
  <pre><code>2017.03.16 11:58:47 WARN   es[o.e.bootstrap]  JNA not found. native methods will be disabled.
  2017.03.16 11:58:47 INFO   es[o.elasticsearch.node]  [sonar-1489661925446] initialized
  2017.03.16 11:58:47 INFO   es[o.elasticsearch.node]  [sonar-1489661925446] starting ...
  </code></pre>
  
  <p>Did not start of course. What could have changed while I was away?</p>
  
  <p>Edit:
  I did not provide the logs after trying to stop Sonar</p>
  
  <pre><code>Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
  
  2017.03.16 16:54:43 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory /proj/tn/tools/sonar/temp
  2017.03.16 16:54:43 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/proj/tn/tools/sonar/temp -javaagent:/afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /proj/tn/tools/sonar/temp/sq-process8365491608077217541properties
  2017.03.16 16:54:43 INFO   es[o.s.p.ProcessEntryPoint]  Starting es
  2017.03.16 16:54:43 INFO   es[o.s.s.EsSettings]  Elasticsearch listening on 127.0.0.1:9001
  2017.03.16 16:54:43 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] version[1.7.5], pid[438787], build[00f95f4/2016-02-02T09:55:30Z]
  2017.03.16 16:54:43 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] initializing ...
  2017.03.16 16:54:43 INFO   es[o.e.plugins]  [sonar-1489679683034] loaded [], sites []
  2017.03.16 16:54:43 INFO   es[o.elasticsearch.env]  [sonar-1489679683034] using [1] data paths, mounts [[/proj/tn (seroisproj02002.mo.sw.ericsson.se:/uproj020036/tn)]], net usable_space [330.8gb], net total_space [4.4tb], types [nfs]
  2017.03.16 16:54:44 WARN   es[o.e.bootstrap]  JNA not found. native methods will be disabled.
  2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] initialized
  2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] starting ...
  2017.03.16 16:54:45 WARN   es[o.s.p.ProcessEntryPoint]  Fail to start es
  org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
      at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.5.jar:na]
      at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.6.2.jar:na]
      at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:102) ~[sonar-process-5.6.2.jar:na]
      at org.sonar.search.SearchServer.main(SearchServer.java:81) [sonar-search-5.6.2.jar:na]
  Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
      at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.5.jar:na]
      ... 8 common frames omitted
  Caused by: java.net.BindException: Address already in use
      at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_102]
      at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_102]
      at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_102]
      at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_102]
      at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_102]
      at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.5.jar:na]
      at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[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$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.5.jar:na]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102]
      at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
  2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] stopping ...
  2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] stopped
  2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] closing ...
  2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] closed
  </code></pre>
  
  <p>Server OS: Linux</p>