0

I'm trying to install sonarqube@7.3 with postgresql on a Debian 9 Stretch virtual machine hosted with Microsoft Azure. Everything works properly except that I can't browse with my real physical machine at mydns.myregion.cloudapp.azure.com:9000.

Any clues to work on this ?


What you'll need to know :

  • Sonarqube is working (logs tell that Sonarqube is up and running properly)
  • nmap localhost shows :
    • 22/tcp open ssh
    • 80/tcp open http
    • 5432/tcp open postgresql
    • 9000/tcp open cslistener
    • 9001/tcp open tor-orport
  • Many tries on sonar.properties but at the moment, the file is very close from the default one except for the DB credentials section and sonar.web.host entry with the ip address of my VM.
  • No lines in the access.log file

NB : I don't have administrator rights on the VM so my options are limited on the azure portal...

Log of web.log :

2018.10.11 09:29:28 ERROR web[][o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-13.69.61.190-9000"] java.net.BindException: Cannot assign requested address at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) 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.11 09:29:28 ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server

Edit : While moving sonar.properties to localhost, curl http://localhost:9000 executed from the VM works and gave me the web page in shell, this is definitely some Azure and ip configuration...

1 Answers1

0

2018.10.11 09:29:28 ERROR web[][o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-13.69.61.190-9000"] java.net.BindException: Cannot assign requested address

There's your problem - That typically means that the port's in use for some reason. Java's syntax is a bit odd there I guess. Looking at your ports in use with this in mind and the line 9000/tcp open cslistener pops out - the ports in use. While I'm not familiar with sonarqube, using a different port would probably sort it out.

The docs suggests that 9000 is your default port (which ties in nicely with my diagnosis) and to fix that you need to edit sonar.properties - I believe there should be a line reading sonar.web.port=9000 which can be altered to any open port.

Journeyman Geek
  • 6,969
  • 3
  • 31
  • 49
  • I really appreciate your answer. But don't you think that it's because SonarQube is actually using it (_cslistener_ can be part of SonarQube...) ? The problem in this is that i cannot open ports myself and i've already asked someone else to open the 9000 one to use SonarQube with it. Futhermore, have you noticed that i use my **physical** machine's browser to access to my url ? I'm thinking that the problem is more relative with this, see [here](https://stackoverflow.com/questions/9682262/how-do-i-connect-to-this-localhost-from-another-computer-on-the-same-network). – JeuneApprenti Oct 11 '18 at 12:14
  • Well SonarQube isn't starting, so its already running or something else is there. [this](https://askubuntu.com/questions/176613/what-is-cslistener/176668#176668) seems to be an identical problem. You will *not* be able to start sonarqube without having an available port for it to listen on. – Journeyman Geek Oct 11 '18 at 12:23
  • This is my bad for commenting that fast... But when SonarQube is not running the port isn't in use (e.g : blank output from sudo fuser -v 9000/tcp) I'm reconsidering previous problems... – JeuneApprenti Oct 11 '18 at 12:53