简体   繁体   English

SonarQube无法启动网络

[英]SonarQube failed to start web

I get the following error when I try to start SonarQube 7.7 on Linux. 尝试在Linux上启动SonarQube 7.7时出现以下错误。

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:112)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)
    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:112)
    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-9000]]
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util..LifecycleBase.init(LifecycleBase.java:107)

Any help will be much appreciated. 任何帮助都感激不尽。

Did you change the property "sonar.web.port" in the sonar.properties file? 您是否在sonar.properties文件中更改了属性“ sonar.web.port”?

I had the same problem when I tried to set this property to port 80. When not running as root user on unix systems it is not allowed to bind to a low port. 当我尝试将此属性设置为端口80时,我遇到了同样的问题。在UNIX系统上未以root用户身份运行时,不允许将其绑定到低端口。

# TCP port for incoming HTTP connections. Default value is 9000.
sonar.web.port=8080

With the default port 9000 it should work. 使用默认端口9000,它应该可以工作。 As an alternative it is possible to forword the low port to the port on which the sonar webserver is running. 作为替代方案,可以将低端端口转发到运行声纳Web服务器的端口。

sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

Additionally this iptables configuration should be saved and restored after system restart. 另外,应在系统重新启动后保存并还原此iptables配置。 To achieve this, there exists different methos depending on the unix system. 为此,根据UNIX系统,存在不同的方法。

In the class ProcessEntryPoint.java there is a connection to a shared directory: 在类ProcessEntryPoint.java中,有一个到共享目录的连接:

public static final String PROPERTY_SHARED_PATH = "process.sharedDir"; 公共静态最终字符串PROPERTY_SHARED_PATH =“ process.sharedDir”;

Maybe you miss access rights. 也许您错过访问权限。 You could try to start as root for testing purpose or look for sharedDir in your configuration . 您可以尝试以root用户身份启动以进行测试,也可以配置中查找sharedDir

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM