我将Sonar升级到4.2,但不是没有启动以下错误。我完全不确定logback.xml的内容是什么。从我可以告诉它的日志配置来取代sonar.properties中的类似配置,但这确实是猜测。我无法在任何地方找到示例logback.xml。
# more sonar.log
--> 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.
Java HotSpot(TM) Server VM warning: You have loaded library /opt/sonar/bin/linux-x86-32/lib/libwrapper.so which might have disabled stack guard. The VM will try to fix the stack g
uard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
2014.03.13 16:48:29 INFO [o.s.a.Connectors] HTTP connector is enabled on port 9000
2014.03.13 16:48:30 INFO [o.a.c.h.Http11Protocol] Initializing ProtocolHandler ["http-bio-0.0.0.0-9000"]
2014.03.13 16:48:30 INFO [o.a.c.c.StandardService] Starting service Tomcat
2014.03.13 16:48:30 INFO [o.a.c.c.StandardEngine] Starting Servlet Engine: Apache Tomcat/7.0.42
2014.03.13 16:48:30 INFO [o.a.c.s.ContextConfig] No global web.xml found
2014.03.13 16:48:30 ERROR [o.s.s.p.PlatformLifecycleListener] Fail to start server
java.lang.IllegalArgumentException: Fail to load the Logback configuration: /opt/sonar/conf/logback.xml
at org.sonar.core.config.Logback.configure(Logback.java:59) ~[sonar-core-4.0.jar:na]
at org.sonar.server.platform.PlatformLifecycleListener.configureLogback(PlatformLifecycleListener.java:64) ~[PlatformLifecycleListener.class:na]
at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:34) ~[PlatformLifecycleListener.class:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.42.jar:7.0.42]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Caused by: java.io.FileNotFoundException: File '/opt/sonar/conf/logback.xml' does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299) ~[commons-io-2.4.jar:2.4]
at org.sonar.core.config.Logback.configure(Logback.java:56) ~[sonar-core-4.0.jar:na]
... 11 common frames omitted
<-- 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.
Java HotSpot(TM) Server VM warning: You have loaded library /opt/sonar/bin/linux-x86-32/lib/libwrapper.so which might have disabled stack guard. The VM will try to fix the stack g
uard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
2014.04.21 12:36:41 INFO [o.s.a.Connectors] HTTP connector is enabled on port 9000
2014.04.21 12:36:41 INFO [o.a.c.h.Http11Protocol] Initializing ProtocolHandler ["http-bio-0.0.0.0-9000"]
2014.04.21 12:36:41 INFO [o.a.c.c.StandardService] Starting service Tomcat
2014.04.21 12:36:41 INFO [o.a.c.c.StandardEngine] Starting Servlet Engine: Apache Tomcat/7.0.42
2014.04.21 12:36:42 INFO [o.a.c.s.ContextConfig] No global web.xml found
2014.04.21 12:36:48 ERROR [o.s.s.p.PlatformLifecycleListener] Fail to start server
java.lang.IllegalArgumentException: Fail to load the Logback configuration: /opt/sonar/conf/logback.xml
at org.sonar.core.config.Logback.configure(Logback.java:59) ~[sonar-core-4.0.jar:na]
at org.sonar.server.platform.PlatformLifecycleListener.configureLogback(PlatformLifecycleListener.java:64) ~[PlatformLifecycleListener.class:na]
at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:34) ~[PlatformLifecycleListener.class:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.42.jar:7.0.42]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]
Caused by: java.io.FileNotFoundException: File '/opt/sonar/conf/logback.xml' does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299) ~[commons-io-2.4.jar:2.4]
at org.sonar.core.config.Logback.configure(Logback.java:56) ~[sonar-core-4.0.jar:na]
... 11 common frames omitted
<-- Wrapper Stopped
答案 0 :(得分:0)
Stacktrace显示仍然使用4.0版(搜索&#34; sonar-core-4.0.jar&#34;)。 v4.2的分发可能在v4.0的现有目录中解压缩,但不是在新目录中。