Unable to start SonarQube on Windows

Hi guys, struggling to get this config working, have referenced online doc’s but still no joy ?

Hi,

In order to help you, we’ll need more detail, starting perhaps with:

  • configurations you’ve tried
  • the results of ^
  • the logs

 
Ann

I’m afraid i’m a beginner with this package, so please forgive me here. I’ve one instance which is running but when i try get the second instance running, the web services with fail’s with the following error:

2018.10.15 16:05:27 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2018.10.15 16:05:28 ERROR web[][o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-0.0.0.0-9001"]
java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Unknown Source)
	at sun.nio.ch.Net.bind(Unknown Source)
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:982)
	at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:245)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:620)
	at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:66)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:997)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
	at org.sonar.server.app.WebServer.start(WebServer.java:51)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
	at org.sonar.server.app.WebServer.main(WebServer.java:91)
2018.10.15 16:05:28 ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server
org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:113)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
	at org.sonar.server.app.WebServer.start(WebServer.java:51)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
	at org.sonar.server.app.WebServer.main(WebServer.java:91)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardService[Tomcat]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:113)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 7 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-9001]]
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 9 common frames omitted
2018.10.15 16:05:28 WARN  web[][o.s.p.ProcessEntryPoint] Fail to start web
java.lang.RuntimeException: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
	at com.google.common.base.Throwables.propagate(Throwables.java:160)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:65)
	at org.sonar.server.app.WebServer.start(WebServer.java:51)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
	at org.sonar.server.app.WebServer.main(WebServer.java:91)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:113)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
	... 4 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardService[Tomcat]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:113)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 7 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-9001]]
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 9 common frames omitted

Any pointer would be great, I tried stopping the other services without success

Dave

Hi Dave,

So far, the errors have nothing to do with LDAP, so I’ve updated the title of this thread. (Feel free to put it back if you really think I’m wrong. :slight_smile:)

This is the crux:

 Failed to initialize end point associated with ProtocolHandler ["http-nio-0.0.0.0-9001"]
 java.net.BindException: Address already in use: bind

You haven’t said this explicitly, but I’m going to intuit that you’re trying to run both instances on the same server (Why two instances? Why on the same server?). SonarQube starts up multiple processes and uses a couple different ports. 9001 is the port used by Elasticsearch by default, so I’m guessing you haven’t configured your second instance to use a non-default port for Elasticsearch even if you did know to update the configuration for the web server.

You mentioned that you get this failure even after you shut the first instance down, but the error message is telling us that the first instance’s Elasticsearch process hasn’t let go of the port (yet?).

 
Ann

Ann sorry your absolutely right, I’ve ran a netstat and I can see 9001 being used already “I assume by Elasticsearch”

To clarify the reason for the second instance, is this once is using local users accounts. I’m hoping to integrate it with our LDAP, i setup the second copy to test LDAP integration without breaking the initial instance.

Hi Dave,

Since your second instance is purely for testing configuration, perhaps you could run it on your localhost and avoid the question of port clash altogether?

 
Ann

Yep I’ve resigned myself to that already, i’m now looking to amend the running config based on local authentication to an LDAP authentication with windows Active Directory.

Ann thanks a million for the feedback I really appreciate it.

Regards,
Dave