2016-11-08 273 views
3

我試圖在遠程Ubuntu機器上部署SonarQube。我啓動了服務器,狀態信息是'SonarQube正在運行'。但幾分鐘後,服務器自動關閉。我得到這個異常:SonarQube:java.lang.IllegalStateException:Webapp未啓動..:SonarQube服務器在我啓動服務器後自動關閉

2016.11.08 16:41:53 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
java.lang.Object.wait(Native Method) 
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143) 
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43) 
2016.11.08 16:41:53 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
java.lang.Object.wait(Native Method) 
java.util.TimerThread.mainLoop(Timer.java:552) 
java.util.TimerThread.run(Timer.java:505) 
2016.11.08 16:41:53 INFO web[][o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 16:41:53 INFO web[][o.s.s.a.TomcatAccessLog] Web server is started 
2016.11.08 16:41:53 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 
2016.11.08 16:41:53 WARN web[][o.s.p.ProcessEntryPoint] Fail to start web 
java.lang.IllegalStateException: Webapp did not start 
     at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-6.1.jar:na] 
     at org.sonar.server.app.WebServer.isUp(WebServer.java:46) [sonar-server-6.1.jar:na] 
     at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-6.1.jar:na] 
     at org.sonar.server.app.WebServer.main(WebServer.java:67) [sonar-server-6.1.jar:na] 
2016.11.08 16:41:53 INFO web[][o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 16:41:54 INFO web[][o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 16:41:54 INFO web[][o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 16:41:54 INFO web[][o.s.s.a.TomcatAccessLog] Web server is stopped 
2016.11.08 16:41:54 INFO app[][o.s.p.m.Monitor] Process[es] is stopping 
2016.11.08 16:41:55 INFO es[][o.s.p.StopWatcher] Stopping process 
2016.11.08 16:41:55 INFO es[][o.elasticsearch.node] [sonarqube] stopping ... 
2016.11.08 16:41:55 INFO es[][o.elasticsearch.node] [sonarqube] stopped 
2016.11.08 16:41:55 INFO es[][o.elasticsearch.node] [sonarqube] closing ... 
2016.11.08 16:41:55 INFO es[][o.elasticsearch.node] [sonarqube] closed 

下面是我的版本:

  • 的Java:JDK 1.8.0_111
  • Ubuntu的:Ubuntu的14.04
  • MySQL的:34年6月5日
  • SonarQube:6.1

以下是完整日誌

--> Wrapper Started as Daemon 
Launching a JVM... 
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org 
    Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. 

WrapperSimpleApp: Unable to locate the class org.sonar.application.App: java.lang.UnsupportedClassVersionError: org/sonar/application/App : Unsupported major.minor version 52.0 

WrapperSimpleApp Usage: 
    java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments] 

Where: 
    app_class:  The fully qualified class name of the application to run. 
    app_arguments: The arguments that would normally be passed to the 
        application. 
<-- Wrapper Stopped 
--> Wrapper Started as Daemon 
Launching a JVM... 
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org 
    Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. 

WrapperSimpleApp: Unable to locate the class org.sonar.application.App: java.lang.UnsupportedClassVersionError: org/sonar/application/App : Unsupported major.minor version 52.0 

WrapperSimpleApp Usage: 
    java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments] 

Where: 
    app_class:  The fully qualified class name of the application to run. 
    app_arguments: The arguments that would normally be passed to the 
        application. 
<-- Wrapper Stopped 
--> Wrapper Started as Daemon 
Launching a JVM... 
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org 
    Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. 

WrapperSimpleApp: Unable to locate the class org.sonar.application.App: java.lang.UnsupportedClassVersionError: org/sonar/application/App : Unsupported major.minor version 52.0 
"sonar.log" 21127L, 1883274C                                 1,1   Top 
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941) 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 
2016.11.08 21:14:58 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
java.lang.Object.wait(Native Method) 
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143) 
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43) 
2016.11.08 21:14:58 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
java.lang.Object.wait(Native Method) 
java.util.TimerThread.mainLoop(Timer.java:552) 
java.util.TimerThread.run(Timer.java:505) 
2016.11.08 21:14:58 INFO web[][o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 21:14:58 INFO web[][o.s.s.a.TomcatAccessLog] Web server is started 
2016.11.08 21:14:58 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 
2016.11.08 21:14:58 WARN web[][o.s.p.ProcessEntryPoint] Fail to start web 
java.lang.IllegalStateException: Webapp did not start 
     at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-6.1.jar:na] 
     at org.sonar.server.app.WebServer.isUp(WebServer.java:46) [sonar-server-6.1.jar:na] 
     at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-6.1.jar:na] 
     at org.sonar.server.app.WebServer.main(WebServer.java:67) [sonar-server-6.1.jar:na] 
2016.11.08 21:14:58 INFO web[][o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 21:14:59 INFO web[][o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 21:14:59 INFO web[][o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-127.0.0.1-9000"] 
2016.11.08 21:14:59 INFO web[][o.s.s.a.TomcatAccessLog] Web server is stopped 
2016.11.08 21:14:59 INFO app[][o.s.p.m.Monitor] Process[es] is stopping 
2016.11.08 21:15:00 INFO es[][o.s.p.StopWatcher] Stopping process 
2016.11.08 21:15:00 INFO es[][o.elasticsearch.node] [sonarqube] stopping ... 
2016.11.08 21:15:00 INFO es[][o.elasticsearch.node] [sonarqube] stopped 
2016.11.08 21:15:00 INFO es[][o.elasticsearch.node] [sonarqube] closing ... 
2016.11.08 21:15:00 INFO es[][o.elasticsearch.node] [sonarqube] closed 
2016.11.08 21:15:00 INFO app[][o.s.p.m.Monitor] Process[es] is stopped 
+0

請提供完整的日誌。謝謝。 –

+0

嗨,我已經編輯的問題。感謝您的幫助 – zenglingbin

回答

1

着名的消息「Unsupported major.minor version 52.0」意味着Java 8沒有被使用,而它是必需的。 您應該檢查JDK 1.8.0_111是否在PATH。如果沒有,另一種方法是編輯conf/wrapper.conf中的屬性wrapper.java.command

+0

感謝您的幫助,我通過您的意見處理問題 – zenglingbin