0

我已经在 rhel 6.3 64 位机器上安装了声纳,但是当尝试使用“http://10.217.14.40:13385/sonar”通过 Web 访问应用程序时,我收到 HTTP 错误 503 服务不可用

以下是日志的最后 100 行

[root@RHEL-6 logs]# tail -100 sonar.log
INFO   | jvm 1    | 2012/09/25 07:58:21 | 07:58:21,136 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - ROOT level set to INFO
INFO   | jvm 1    | 2012/09/25 07:58:21 | 07:58:21,136 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SONAR_FILE] to Logger[ROOT]
INFO   | jvm 1    | 2012/09/25 07:58:21 | 07:58:21,136 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@77435978 - Registering current configuration as safe fallback point
INFO   | jvm 1    | 2012/09/25 07:58:21 |
2012.09.25 07:58:21 INFO  o.s.s.p.ServerImpl  Sonar Server / 3.2 / d9303b2d9d4c1e75f8536e4144028f1999f727f4
2012.09.25 07:58:21 INFO  o.s.s.d.EmbeddedDatabase  Starting embedded database on port 9092 with url jdbc:h2:tcp://10.217.14.40:13384/sonar
2012.09.25 07:58:21 ERROR o.s.s.p.Platform  Unable to start database
org.sonar.api.utils.SonarException: Unable to start database
        at org.sonar.server.database.EmbeddedDatabase.start(EmbeddedDatabase.java:75) ~[classes/:na]
        at org.sonar.server.database.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:41) ~[classes/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_07]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_07]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_07]
        at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_07]
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1009) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002) ~[picocontainer-2.14.1.jar:na]
        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760) ~[picocontainer-2.14.1.jar:na]
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70) ~[sonar-plugin-api-3.2.jar:na]
        at org.sonar.server.platform.Platform.startDatabaseConnectors(Platform.java:166) ~[classes/:na]
        at org.sonar.server.platform.Platform.init(Platform.java:114) ~[classes/:na]
        at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:33) [classes/:na]
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1272) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.25.jar:6.1.25]
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.jetty.Server.doStart(Server.java:224) [jetty-6.1.25.jar:6.1.25]
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.25.jar:6.1.25]
        at org.sonar.application.JettyEmbedder.start(JettyEmbedder.java:72) [sonar-application-3.2.jar:na]
        at org.sonar.application.StartServer.main(StartServer.java:48) [sonar-application-3.2.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_07]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_07]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_07]
        at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_07]
        at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) [wrapper-3.2.3.jar:3.2.3]
        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_07]
Caused by: org.h2.jdbc.JdbcSQLException: Exception opening port "9092" (port may be in use), cause: "java.net.BindException: Address already in use" [90061-167]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) ~[h2-1.3.167.jar:1.3.167]
        at org.h2.message.DbException.get(DbException.java:158) ~[h2-1.3.167.jar:1.3.167]
        at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:190) ~[h2-1.3.167.jar:1.3.167]
        at org.h2.util.NetUtils.createServerSocket(NetUtils.java:156) ~[h2-1.3.167.jar:1.3.167]
        at org.h2.server.TcpServer.start(TcpServer.java:222) ~[h2-1.3.167.jar:1.3.167]
        at org.h2.tools.Server.start(Server.java:455) ~[h2-1.3.167.jar:1.3.167]
        at org.sonar.server.database.EmbeddedDatabase.start(EmbeddedDatabase.java:71) ~[classes/:na]
        ... 35 common frames omitted
Caused by: java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method) ~[na:1.7.0_07]
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376) ~[na:1.7.0_07]
        at java.net.ServerSocket.bind(ServerSocket.java:376) ~[na:1.7.0_07]
        at java.net.ServerSocket.<init>(ServerSocket.java:237) ~[na:1.7.0_07]
        at java.net.ServerSocket.<init>(ServerSocket.java:128) ~[na:1.7.0_07]
        at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:186) ~[h2-1.3.167.jar:1.3.167]
        ... 39 common frames omitted
INFO   | jvm 1    | 2012/09/25 07:58:21 | 2012-09-25 07:58:21.716:WARN::Failed startup of context org.mortbay.jetty.webapp.WebAppContext@1778db3{/,file:/home/BuildTools/sonar-3.2/war/sonar-server}
INFO   | jvm 1    | 2012/09/25 07:58:21 | org.sonar.api.utils.SonarException: Unable to start database
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.server.database.EmbeddedDatabase.start(EmbeddedDatabase.java:75)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.server.database.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:41)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at java.lang.reflect.Method.invoke(Method.java:601)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.behaviors.Stored.start(Stored.java:110)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1009)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.server.platform.Platform.startDatabaseConnectors(Platform.java:166)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.server.platform.Platform.init(Platform.java:114)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:33)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1272)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.jetty.Server.doStart(Server.java:224)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.application.JettyEmbedder.start(JettyEmbedder.java:72)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.sonar.application.StartServer.main(StartServer.java:48)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at java.lang.reflect.Method.invoke(Method.java:601)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
INFO   | jvm 1    | 2012/09/25 07:58:21 |       at java.lang.Thread.run(Thread.java:722)
INFO   | jvm 1    | 2012/09/25 07:58:21 | 2012-09-25 07:58:21.737:INFO::Started SelectChannelConnector@10.217.14.40:13385
4

1 回答 1

2

正如您在日志中看到的,Sonar 无法启动,因为 H2 数据库无法启动。无法启动,因为 9092 端口已被使用:

Exception opening port "9092" (port may be in use), cause: "java.net.BindException: Address already in use"

这意味着您已经有另一个使用此端口的进程 - 可能是另一个已经启动的 Sonar 实例......

于 2012-09-25T13:20:25.630 回答