Moving from SQ 7.8 to SQ 7.9 LTS

We are attempting to upgrade from Sonarqube version 7.8 to 7.9. We are currently running Sonarqube with mysql as well as java 8. This means (from what we can tell) to complete this upgrade to Sonarqube 7.9 we will need to complete a database migration, a java upgrade, and a version upgrade for Sonarqube. We have figured out how to complete the database migration to postgres just fine. However, We will to go ahead and upgrade from Java 8 to Java 11 so we can prepare for the version upgrade. Unfortunately, after going into the wrapper.conf and changing the binary path to point at java 11 we are unable to bring Sonarqube back up with this new version of Java. We are seeing elastic search exist with a code of 143 in the sonar.log and we are seeing an ldap connection test failed error in the web.log. We have not changed anything in the configuration file between using java 8 and java 11. We are looking for some guidance or advice on getting this completed.

NOTE: We are running this on RHEL 7.

Hey there.

Are you trying to run SonarQube v7.8 on Java 11, or SonarQube v7.9? Please take note that SonarQube v7.9 LTS was the first version of SonarQube to officially support Java 11 as a runtime.

We are attempting to run 7.8 with Java 11 because according to the documentation Java 11 is supposedly supported. Prerequisites and Overview | SonarQube Docs. If we follow what you are saying, is the suggested path forward for a version upgrade to do a database migration first and then upgrade the java and sonarqube version at the same time?

Ah wow, my memory really failed me there. Sorry about that, you’re right.

What are the full errors you’re getting in your log files? (ce.log, es.log, web.log, sonar.log… whatever you are looking at in your logs directory)


2021.04.27 16:43:49 INFO  app[][] Elasticsearch listening on /
2021.04.27 16:43:49 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/hd/dt/var/sonarqube-7.8/elasticsearch]: /opt/hd/dt/var/sonarqube-7.8/elasticsearch/bin/elasticsearch
2021.04.27 16:43:49 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021.04.27 16:43:50 INFO  app[][o.e.p.PluginsService] no modules loaded
2021.04.27 16:43:50 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2021.04.27 16:43:59 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2021.04.27 16:43:59 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/hd/dt/var/sonarqube-7.8]: /usr/lib/jvm/java-11-openjdk- -Djava.awt.headless=true -Dfile.encoding=UTF-8 --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.proxyHost=<We have a proxy server here> -Dhttp.proxyPort=7070 -Dhttp.nonProxyHosts=localhost|127.*|[::1] -Dhttps.proxyHost=<We have an actual proxy here> -Dhttps.proxyPort=7070 -cp ./lib/common/*:/opt/hd/dt/var/sonarqube-7.8/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar /opt/hd/dt/var/sonarqube-7.8/temp/sq-process13515517914673474380properties
2021.04.27 16:44:09 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2021.04.27 16:44:09 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2021.04.27 16:44:09 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.04.27 16:44:09 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

web.log error:

org.sonar.api.utils.SonarException: Security realm fails to start: Unable to open LDAP connection
at org.sonar.server.user.SecurityRealmFactory.start(
at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(
at org.picocontainer.behaviors.AbstractBehavior.start(
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(
at org.picocontainer.behaviors.Stored.start(
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(
at org.picocontainer.DefaultPicoContainer.startAdapters(
at org.picocontainer.DefaultPicoContainer.start(
at org.sonar.core.platform.ComponentContainer.startComponents(
at org.sonar.server.platform.platformlevel.PlatformLevel.start(
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(
at org.sonar.server.platform.Platform.start(
at org.sonar.server.platform.Platform.startLevel34Containers(
at org.sonar.server.platform.Platform.access$500(
at org.sonar.server.platform.Platform$1.lambda$doRun$0(
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(
at org.sonar.server.platform.Platform$1.doRun(
at org.sonar.server.platform.Platform$
at java.base/
Caused by: org.sonar.plugins.ldap.LdapException: Unable to open LDAP connection
at org.sonar.plugins.ldap.LdapContextFactory.testConnection(
at org.sonar.plugins.ldap.LdapRealm.init(
at org.sonar.server.user.SecurityRealmFactory.start(
… 19 common frames omitted
Caused by: javax.naming.CommunicationException: simple bind failed:
at java.naming/com.sun.jndi.ldap.LdapClient.authenticate(
at java.naming/com.sun.jndi.ldap.LdapCtx.connect(
at java.naming/com.sun.jndi.ldap.LdapCtx.(
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(
at java.naming/javax.naming.spi.NamingManager.getInitialContext(
at java.naming/javax.naming.InitialContext.getDefaultInitCtx(
at java.naming/javax.naming.InitialContext.init(
at java.naming/javax.naming.ldap.InitialLdapContext.(
at org.sonar.plugins.ldap.LdapContextFactory.createInitialDirContext(
at org.sonar.plugins.ldap.LdapContextFactory.createBindContext(
at org.sonar.plugins.ldap.LdapContextFactory.testConnection(
… 21 common frames omitted
Caused by: Connection or outbound has closed
at java.base/$AppOutputStream.write(
at java.base/
at java.base/
at java.naming/com.sun.jndi.ldap.Connection.writeRequest(
at java.naming/com.sun.jndi.ldap.Connection.writeRequest(
at java.naming/com.sun.jndi.ldap.LdapClient.ldapBind(
at java.naming/com.sun.jndi.ldap.LdapClient.authenticate(
… 35 common frames omitted
2021.04.27 16:44:08 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process
2021.04.27 16:44:09 WARN web[o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms
2021.04.27 16:44:09 WARN web[o.s.s.a.EmbeddedTomcat] Failed to stop web server
org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.stop(
at org.apache.catalina.startup.Tomcat.stop(
at org.sonar.process.ProcessEntryPoint$HardStopperThread.lambda$new$0(
at java.base/java.util.concurrent.Executors$
at java.base/
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.base/java.util.concurrent.ThreadPoolExecutor$
at java.base/
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.stop(
at org.apache.catalina.core.StandardServer.stopInternal(
at org.apache.catalina.util.LifecycleBase.stop(
… 9 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.stop(
at org.apache.catalina.core.StandardService.stopInternal(
at org.apache.catalina.util.LifecycleBase.stop(
… 11 common frames omitted
Caused by: org.apache.catalina.LifecycleException: A child container failed during stop
at org.apache.catalina.core.ContainerBase.stopInternal(
at org.apache.catalina.util.LifecycleBase.stop(
… 13 common frames omitted

These two logs contain the errors we are seeing. When attempting to use Java 11 we change the path in the wrapper.conf to point at our java 11 binary and have not touched anything in our configuration file other than the two outdated Garbage collection calls in the java options.

Hm. :thinking: Are you using ldap or ldaps, and which port are you specifying?

ldap as that is what is in our prior configuration. As well which ports are you referring to? proxy port, http port, https port, or some other port?

I am still having issues with this. Is there any more ideas or questions?

After looking back again I also noticed that I am initiating an ldaps connection to three different ldap servers not ldap.