Charts: stable/sonarqube errors when used with image.tag: 7.1-alpine

Created on 16 Jul 2018  路  8Comments  路  Source: helm/charts

Is this a request for help?: No, just reporting error and hint for a way to fix it


BUG REPORT

Version of Helm and Kubernetes: Minikube 0.28.0, Kubernetes 1.10.0, Helm 2.9.1

Which chart: stable/sonarqube

What happened:

Start helm chart with default values.yaml with

image.tag | sonarqube聽image tag. | 6.5

and it works fine. If you change the image.tag to latest "7.1-alpine" an error occurs and sonarqube pod cycles and never properly starts.

This is the error found in the pod log:

Error: Could not find or load main class org.sonar.server.app.WebServer

The cause of the problem is probably after version 6.5 the WebServer class was renamed, moved or removed and some startup script was not changed in unison.

What you expected to happen:

SonarQube start correctly with version 7.1-alpine

How to reproduce it (as minimally and precisely as possible):

Change the default chart value for the image.tag to 7.1-alpine and install the stable/sonarqube chart

Anything else we need to know:

Perhaps this small thread is also related as it reports the same error message.

The workaround is to start with the older, default version of SonarQube 6.5 until this is resolved.

lifecyclstale

Most helpful comment

Hi,

The charts were updated a few days ago to cater to new Sonarqube images, but when using those charts, ElasticSearch startup still fails to startup and stops Sonarqube.

Currently using a 7.4-community image of Sonarqube, and also tested with owasp/sonarqube.
Helm install still failing.

Also seeing this issue.

19:57:31.032 [main] WARN org.sonar.application.config.AppSettingsLoaderImpl - Configuration file not found: /opt/sonarqube/conf/sonar.properties

2019.01.03 19:57:31 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp

2019.01.03 19:57:31 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001

2019.01.03 19:57:31 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es

2019.01.03 19:57:31 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

2019.01.03 19:57:33 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 137

2019.01.03 19:57:33 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped

2019.01.03 19:57:33 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

All 8 comments

My working value.yaml file is here: https://github.com/javajon/code-analysis/blob/master/sonarqube-values.yaml. If you increase the image.tag version in this file the same error will result. Also tried with "image.tag: 6.7.1-alpine" and that produced a different error.

Can you post the full pod log?
The chart runs the startup script provided by SonarQube and that hasn't changed in 7.1.

What will certainly fail though is that the newer versions don't run as root but all files on the PVCs are by default owned by root and the chart does nothing to change that.

I experience the same behavior. Interestingly it only occures when we use kubernetes, if we create the same environment in docker-compose it runs without problem.
We experienced the problem with the 7.0-alpine version but then the logbar-core jar file was missing.

Our logs from the 7.1-alpine:

2018.08.01 10:59:08 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2018.08.01 10:59:08 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.08.01 10:59:08 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2018.08.01 10:59:08 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.08.01 10:59:09 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.08.01 10:59:09 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.08.01 10:59:17 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.08.01 10:59:17 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/te
mp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.1.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process2851569152015110080properties
Error: Could not find or load main class org.sonar.server.app.WebServer
2018.08.01 10:59:17 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [web]: 1
2018.08.01 10:59:17 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.08.01 10:59:17 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.01 10:59:17 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2018.08.01 10:59:17 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143

and the logs from 7.0-alpine:

2018.08.01 09:56:51 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2018.08.01 09:56:51 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.08.01 09:56:51 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2018.08.01 09:56:51 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.08.01 09:56:52 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.08.01 09:56:52 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.08.01 09:57:00 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.08.01 09:57:00 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/te
mp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.1.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process263989060083206113properti
es
Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
        at org.sonar.process.Lifecycle.<clinit>(Lifecycle.java:42)
        at org.sonar.process.ProcessEntryPoint.<init>(ProcessEntryPoint.java:39)
        at org.sonar.process.ProcessEntryPoint.createForArguments(ProcessEntryPoint.java:193)
        at org.sonar.server.app.WebServer.main(WebServer.java:87)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 9 more
Exception in thread "main" java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
        at org.sonar.process.Lifecycle.<clinit>(Lifecycle.java:42)
        at org.sonar.process.ProcessEntryPoint.<init>(ProcessEntryPoint.java:39)
        at org.sonar.process.ProcessEntryPoint.createForArguments(ProcessEntryPoint.java:193)
        at org.sonar.server.app.WebServer.main(WebServer.java:87)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 9 more
2018.08.01 09:57:00 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [web]: 1
2018.08.01 09:57:00 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.08.01 09:57:00 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.01 09:57:00 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
2018.08.01 09:57:00 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

Even stranger that once we could start the 7.0-alpine and the logback-core was present in the folder.

The non alpine images work fine.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

Hi,

The charts were updated a few days ago to cater to new Sonarqube images, but when using those charts, ElasticSearch startup still fails to startup and stops Sonarqube.

Currently using a 7.4-community image of Sonarqube, and also tested with owasp/sonarqube.
Helm install still failing.

Hi,

The charts were updated a few days ago to cater to new Sonarqube images, but when using those charts, ElasticSearch startup still fails to startup and stops Sonarqube.

Currently using a 7.4-community image of Sonarqube, and also tested with owasp/sonarqube.
Helm install still failing.

Also seeing this issue.

19:57:31.032 [main] WARN org.sonar.application.config.AppSettingsLoaderImpl - Configuration file not found: /opt/sonarqube/conf/sonar.properties

2019.01.03 19:57:31 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp

2019.01.03 19:57:31 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001

2019.01.03 19:57:31 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es

2019.01.03 19:57:31 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

2019.01.03 19:57:33 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 137

2019.01.03 19:57:33 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped

2019.01.03 19:57:33 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

The issues is still there:
2019.02.13 10:52:11 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp 2019.02.13 10:52:11 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001 2019.02.13 10:52:12 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es 2019.02.13 10:52:12 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running 2019.02.13 10:52:16 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 137 2019.02.13 10:52:16 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped 2019.02.13 10:52:16 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

Was this page helpful?
0 / 5 - 0 ratings