SonarQube image in OpenShift

i am trying to use the latest sonarqube image (7.9-community) on openshift.
i saw a similar issues #254 ( with similar problem (tried optional solutions in #254)
bottom line, after OpenShift pulling the image the pod seem to crush after few seconds with this log:

tail: cannot open ‘./logs/es.log’ for reading: No such file or directory
2019.09.08 06:53:26 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.09.08 06:53:26 INFO app[] Elasticsearch listening on /
2019.09.08 06:53:27 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2019.09.08 06:53:27 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.09.08 06:53:27 INFO app[o.e.p.PluginsService] no modules loaded
2019.09.08 06:53:27 INFO app[o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019.09.08 06:53:28 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2019.09.08 06:53:28 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
2019.09.08 06:53:28 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

I don’t think it’s a permission issue (using the tips from issue #254) and i don’t think it’s something with the ElasticSearch memory because don’t have any limitation here.
i know that you don’t support openshift but i saw here that users in the community using sonarqube on openshift successfully.

I’m having trouble getting mine to work.

Much appreciated help!

1 Like

I do have similar issues, but managed to successfully deploy the latest sonarqube 7.9 on OpenShift platform, but the biggest challenge I have is the redeployment fails with below error. Looks like issues with Elastic Search indexes. Not stable on OpenShift due to Elastic Search, if you delete /opt/sonarqube/data/es6 folder and redeploy this works sometimes.

If you have downloaded and installed any other additional plugins on top of this, those will be retained (only if it is persistent jenkins instance)2019.09.25 12:25:08 ERROR web[o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to execute ES index request for key ‘projectmeasures.auth.projectmeasure.initialized’ on index ‘metadatas’ on type ‘metadata’
at java.base/java.lang.Iterable.forEach(
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(
at java.base/$Head.forEach(
at java.base/java.util.Optional.ifPresent(
at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(
at org.sonar.server.user.DoPrivileged.execute(
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(
at org.sonar.server.platform.Platform.executeStartupTasks(
at org.sonar.server.platform.Platform.access$400(
at org.sonar.server.platform.Platform$1.lambda$doRun$1(
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.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes were available: [{sonarqube}{oFDAQZUaTxKW-KMYwkyq0w}{CiNrUYK3SbSdxF-NgXYcFA}{}{}{rack_id=sonarqube}]
at org.elasticsearch.client.transport.TransportClientNodesService$RetryListener.onFailure(
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(
at org.elasticsearch.transport.TransportService.lambda$onConnectionClosed$8(
at org.elasticsearch.common.util.concurrent.ThreadContext$
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.base/java.util.concurrent.ThreadPoolExecutor$
… 1 common frames omitted
Caused by: org.elasticsearch.transport.NodeDisconnectedException: [sonarqube][][indices:data/write/index] disconnected
2019.09.25 12:25:08 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process
2019.09.25 12:25:08 INFO web[o.s.s.n.NotificationDaemon] Notification service stopped
2019.09.25 12:25:10 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
2019.09.25 12:25:10 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped