Sonarqube not working

I am using sonarqube-7.9.3 on linux but it’s failing to start.

We have multiple pipelines configured with sonarqube and as sonarqube is not working we are getting blocked from running the pipelines.

I am getting the below error from wrapper.log –

./sonar.sh console

Running SonarQube...
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | 2022.02.02 14:01:44 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /app/jboss/sonarqube/sonarqube-7.9.3/temp
jvm 1    | 2022.02.02 14:01:44 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:29001
jvm 1    | 2022.02.02 14:01:44 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/app/jboss/sonarqube/sonarqube-7.9.3/elasticsearch]: /app/jboss/sonarqube/sonarqube-7.9.3/elasticsearch/bin/elasticsearch
jvm 1    | 2022.02.02 14:01:44 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | 2022.02.02 14:01:44 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2022.02.02 14:01:44 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1    | Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/config/properties/PropertiesConfigurationFactory
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
jvm 1    | Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory
jvm 1    |      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
jvm 1    |      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
jvm 1    |      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
jvm 1    |      ... 1 more
jvm 1    | 2022.02.02 14:01:45 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2022.02.02 14:01:45 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2022.02.02 14:01:45 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1    | 2022.02.02 14:01:46 INFO  app[][o.e.c.t.TransportClientNodesService] failed to get node info for {#transport#-1}{loIPeNBmSUiu7qYtYt4CdQ}{127.0.0.1}{127.0.0.1:29001}, disconnecting...
jvm 1    | java.lang.IllegalStateException: Future got interrupted
jvm 1    |      at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:60)
jvm 1    |      at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:34)
jvm 1    |      at org.elasticsearch.transport.ConnectionManager.internalOpenConnection(ConnectionManager.java:209)
jvm 1    |      at org.elasticsearch.transport.ConnectionManager.openConnection(ConnectionManager.java:80)
jvm 1    |      at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:367)
jvm 1    |      at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:411)
jvm 1    |      at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:362)
jvm 1    |      at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:201)
jvm 1    |      at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:342)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl$MinimalTransportClient.<init>(EsConnectorImpl.java:108)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl.buildTransportClient(EsConnectorImpl.java:89)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl.getTransportClient(EsConnectorImpl.java:74)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:61)
jvm 1    |      at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:88)
jvm 1    |      at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:73)
jvm 1    |      at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:58)
jvm 1    |      at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:201)
jvm 1    |      at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:258)
jvm 1    | Caused by: java.lang.InterruptedException: null
jvm 1    |      at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343)
jvm 1    |      at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:251)
jvm 1    |      at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:94)
jvm 1    |      at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:57)
jvm 1    |      ... 17 common frames omitted
wrapper  | <-- Wrapper Stopped

Can anyone please help.

Thanks and Regards,
Subhasish

Hi,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.3 → 8.9.7 → 9.3 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, at a guess someone “cleaned up” instances of the Log4J jar in your system because of the recent vulnerability disclosures & that’s why SonarQube won’t start. The error in your log indicates something along those lines.

Current versions are patched for those vulnerabilities, so you should be secure both from attacks and from over-zealous housekeeping. :slight_smile:

 
HTH,
Ann

Hi Team,

Thanks for the help.

As per the request : Sonarqube not working - Get help / SonarQube - SonarSource Community we upgraded the sonarqube to the latest LTS version( sonarqube-8.5.7).

But when we are running the sonarqube from the Jenkins, the build is getting scanned but the build is failing with the below failure :

org.quality.gates.jenkins.plugin.QGException: Expected status 200, got: 400. Response: {“errors”:[{“msg”:“The \u0027component\u0027 parameter is missing”}]}
at org.quality.gates.sonar.api.SonarHttpRequester.executeGetRequest(SonarHttpRequester.java:124)
at org.quality.gates.sonar.api.SonarHttpRequester.getAPITaskInfo(SonarHttpRequester.java:151)
at org.quality.gates.sonar.api.QualityGatesProvider.getAPIResultsForQualityGates(QualityGatesProvider.java:62)
at org.quality.gates.jenkins.plugin.BuildDecision.getStatus(BuildDecision.java:24)
at org.quality.gates.jenkins.plugin.QGPublisher.perform(QGPublisher.java:85)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
at hudson.model.Build$BuildExecution.post2(Build.java:177)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697)
at hudson.model.Run.execute(Run.java:1931)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step ‘Quality Gates Sonarqube Plugin’ marked build as failure

and we are using below quality gate profile in our Jenkins :

And below is the sonar profile in the Jenkins :

Though sonarqubes is running fine in our linux machine still the builds are failing at the quality gate profile stage.

Please advise further.

Thanks in advance.


Uploading: sonarqubes_profile.png…

Hi,

First, I hope “8.5.7” as a typo & you actually upgraded to 8.9.7.

Second, this is a new question. Please create a new topic for it.

 

Thx,
Ann

Hi Ann,

Thanks for the response.

I have opened a new ticket.

Please help at the earliest as this is a real blocker for the development team as many build pipelines are failing as sonar quality gate profile plugin is having some issues and the code is not getting scanned nor the results getting published.

Thanks in advance.

Regards,
Subhasish