Sonarqube upgrade -Getting Permissio denied error

Hi All,

Good Afternoon !!

I’m trying to upgrade sonar new version from sonarqube 6.5 to sonarqube 6.7.6
I got the below error when trying to start the service (service sonar start).

Info : Run the sonar as service (User name : sonar)

Also we changed the user as sudo user and ran and got the same error.

Kindly help the same.

Thanks in advance.

Please find the los details:

2019.01.24 15:50:58 ERROR web[][o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-0.0.0.0-80"]
java.net.SocketException: Permission denied
        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)
2019.01.24 15:50:58 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:64)
        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-80]]
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
        ... 9 common frames omitted

Hi,

For clarity, which log is this from? Also, are there exceptions in any of the other logs?

 
Ann

Hi Ann,

Thanks for looking into this.

This is sonar Web logs.
No. I got permission denied error while starting the sonar server. But I gave all permission.
Kindly help the same.

Thanks & Regards,
Banupriya.K.P

  1. Is the old SonarQube server still running?

  2. It looks like you are trying to start up on port 80, and traditionally on UNIX systems only root users can bind to such ports (note that you should not start SonarQube as root user). Have you changed sonar.web.port in your $SONARQUBE_HOME/conf/sonar.properties file, and if so what happens if you comment out that configuration (and it defaults to port 9000?)

1 Like

Thank you so much Colin.

Yes you are correct. The problem is in that port. We have fixed it.