gpt4 book ai didi

service - 升级 SonarQube 问题

转载 作者:行者123 更新时间:2023-12-04 01:44:21 26 4
gpt4 key购买 nike

我在安装 SonarQube 实例时遇到问题4.4 至 5.1。

instructions说停止 SonarQube 服务器,匹配几个文件(备份数据库,复制插件等),然后重新启动 Sonar 服务器以获取更新版本。

我的问题是我不确定如何启动/停止服务器。命令:

bin/<SYSTEM>/sonar stop


NEW_SONARQUBE_HOME/bin/<SYSTEM>/sonar start

不被认可。这是文件位置的样子,这是我在 StartSonar 时遇到的错误在新实例上。

enter image description here
当我从 5.1 开始
enter image description here
当我从 4.4 开始
enter image description here

Sonar 日志错误。我正在使用端口 9000,所以我不确定它为什么要尝试获取 9001
    2015.06.12 09:59:47 ERROR web[o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-0.0.0.0-9000"]
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_55]
at sun.nio.ch.Net.bind(Net.java:444) ~[na:1.7.0_55]
at sun.nio.ch.Net.bind(Net.java:436) ~[na:1.7.0_55]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) ~[na:1.7.0_55]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.7.0_55]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:343) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:730) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) [sonar-server-5.1.1.jar:na]
at org.sonar.server.app.WebServer.start(WebServer.java:40) [sonar-server-5.1.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) [sonar-process-5.1.1.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:66) [sonar-server-5.1.1.jar:na]
2015.06.12 09:59:47 ERROR web[o.a.c.c.StandardService] Failed to initialize connector [Connector[HTTP/1.1-9000]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-9000]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) [sonar-server-5.1.1.jar:na]
at org.sonar.server.app.WebServer.start(WebServer.java:40) [sonar-server-5.1.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) [sonar-process-5.1.1.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:66) [sonar-server-5.1.1.jar:na]
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:962) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
... 10 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_55]
at sun.nio.ch.Net.bind(Net.java:444) ~[na:1.7.0_55]
at sun.nio.ch.Net.bind(Net.java:436) ~[na:1.7.0_55]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) ~[na:1.7.0_55]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.7.0_55]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:343) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:730) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
... 11 common frames omitted
2015.06.12 09:59:47 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:156) ~[guava-10.0.1.jar:na]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:65) ~[sonar-server-5.1.1.jar:na]
at org.sonar.server.app.WebServer.start(WebServer.java:40) [sonar-server-5.1.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) ~[sonar-process-5.1.1.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:66) [sonar-server-5.1.1.jar:na]
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) ~[sonar-server-5.1.1.jar:na]
... 3 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
... 6 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:574) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
... 8 common frames omitted
2015.06.12 09:59:47 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopping
2015.06.12 09:59:47 INFO es[o.s.p.StopWatcher] Stopping process
2015.06.12 09:59:47 INFO es[o.elasticsearch.node] [sonar-1434117578819] stopping ...
2015.06.12 09:59:47 INFO es[o.elasticsearch.node] [sonar-1434117578819] stopped
2015.06.12 09:59:47 INFO es[o.elasticsearch.node] [sonar-1434117578819] closing ...
2015.06.12 09:59:47 INFO es[o.elasticsearch.node] [sonar-1434117578819] closed
2015.06.12 09:59:47 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopped
<-- Wrapper Stopped

如何停止/启动 SonarQube Web 服务器并继续升级?

最佳答案

在 Windows 上,脚本确实不同:

  • 如果你还没有安装 SonarQube 作为服务,你应该阅读 "Running SonarQube as a Service on Windows"知道如何启动和停止
  • 如果没有,那么:
  • 要启动 SonarQube,您必须执行“StartSonar.bat”脚本:这将打开一个命令窗口
  • 要停止 SonarQube,只需关闭打开的窗口

  • SQ 4.4 和 SQ 5.1 之间的区别在于,在最新版本中,当您启动 SonarQube 时,它​​会创建 3 个不同的进程:
  • 1 用于 Web 服务器(端口 9000)
  • 1 用于 Elasticsearch(端口 9001)
  • 和 1 监视前 2 个

  • 因此,您的日志 ( Address already in use: bind ) 中发生的事情很清楚:您有一个正在运行的 Elasticsearch 进程。因此,要解决您的问题:
  • 打开 Windows 任务管理器
  • 杀死所有 Java 进程
  • 重启 SQ
  • 关于service - 升级 SonarQube 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30782863/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com