Stacktrace shows that version 4.0 is still used (search for "sonar-core-4.0.jar"). Distribution of v4.2 was probably unzipped in the existing directory of v4.0 but not in a fresh dir.
Sonar 4.2: logback.xml does not exist
-
07-07-2023 - |
Question
I upgraded Sonar to 4.2, but not it fails to start with the following errors. I'm not sure what the roll of logback.xml is, exactly. From what I can tell it's a configuration for logging that replaces similar configs from sonar.properties, but that's sure speculation. I can't find a sample logback.xml anywhere.
# 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
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow