Sonarqube upgrade issues from 7.3 to 7.9 LTS

Hi,

We have tried to upgrade Sonarqube server from 7.3 to 9.9 LTS version. And it gave me below error and upgrade failed.

As a pre-requisite we have upgrade the Java version to 11. Initially it was Java 8. Please help us with this error and make the upgrade successful.

2019.07.08 14:32:34 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/apps/sonar/sonarqube-7.9/elasticsearch]: /apps/sonar/sonarqube-7.9/elasticsearch/bin/elasticsearch
2019.07.08 14:32:34 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.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2019.07.08 14:32:34 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2019.07.08 14:32:34 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019.07.08 14:32:34 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
FATAL StatusLogger Interrupted before Log4j Providers could be loaded.
 java.lang.InterruptedException
        at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1261)
        at java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:317)
        at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:121)
        at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:108)
        at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
        at org.elasticsearch.common.unit.ByteSizeValue.<clinit>(ByteSizeValue.java:39)
        at org.elasticsearch.common.network.NetworkService.<clinit>(NetworkService.java:57)
        at org.elasticsearch.transport.TransportSettings.<clinit>(TransportSettings.java:74)
        at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:105)
        at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:135)
        at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:277)
        at org.sonar.application.es.EsConnectorImpl$MinimalTransportClient.<init>(EsConnectorImpl.java:103)
        at org.sonar.application.es.EsConnectorImpl.buildTransportClient(EsConnectorImpl.java:89)
        at org.sonar.application.es.EsConnectorImpl.getTransportClient(EsConnectorImpl.java:74)
        at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:61)
        at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:88)
        at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:73)
        at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:58)
        at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:201)
        at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:258)
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
<-- Wrapper Stopped

Thanks,
Srikanth

Hi,

How are you starting SonarQube? I don’t think the startup scripts that are bundled use the JVM option UseParNewGC.

Hi Durate,

Thanks for the quick response.

I am using ./sonar.sh start to start the server.

Thanks,
Srikanth

I searched our scripts and the options used to launch the 3 processes and can’t find UseParNewGC.

Could it be that you defined additional java options? For example, do you have sonar.web.javaOpts, sonar.ce.javaOpts or sonar.search.javaOpts defined in conf/sonar.properties?

Hello Team,
We are also facing the same issue.
I think this is coming from ElasticSearch JVM initialisation, but I could not find UseParNewGC Options in Elasticsearch/config/jvm.options

Any Help?