I am unable to stand up a new server instance and running into Java Error:
Environment: Rhel 7.9
Docker: sonarqube:9.8 ; postgres:15
Java: OPenJDK Version 17.0.2, JRE 21.9, OPenJDK 64-Bit Server VM21.9
Docker-Compose:
Docker Logs Error: sonarqube | app[] [o.s.a.ProcessLauncherImpl] Launch Process [ELASTICSEARCH] FROM [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch/
Sonarqube | could not find java in ES_JAVA_HOME at /usr/lib/jvm/java-17-openjdk/bin/java
Sonarqube | process exitied with exit value [elasticsearch]: 1
Sonarqube | Process Elasticsearch is stopped
Sonarqube | Sonarqube is stopped
Exited with code 0
thanks for posting on our community! I was docker-composing your file (with the exception of the java-certs mounting), but I can’t hit any issues.
Let me ask you a few questions to understand your context better:
You use our sonarqube:latest. This means that you are using SonarQube 9.9 community edition: is it your intention, right? I’m asking because you mention to run SQ 9.8. Are you trying to migrate from SonarQube 9.8 to 9.9?
The env variable ES_JAVA_HOME does need to be set explicitly by you. Could you please make sure that is unset?
I would like to ask you also to give a try running the image on a fresh volume, just to check if the issue is related to some past configurations.
I have tried a fresh install of 9.8 (on the original post) about a week ago and have been troubleshooting different java errors related to ```
could not find java in ES_JAVA_HOME
“”"
This morning i tried a separate server and fresh install with SQ9.9/PG:13/Java11/same docker-compose based on various forums and suggestions trying different versions to see if i had pulled a bad image and i am still running into java errors.
I assume that i need to install java in a specific manner for Sonarqube but am unsure what all it needs to be successful
another question for you: which is the version of your Docker engine?
While getting this info, may I ask you to try docker-composing this file? It’s one of the docker-compose examples that we provide in our repo and that seems to fit your use case well. Please remove all existing SonarQube-related volumes to have a fresh installation of this file.
Please also note that, if you install SonarQube via a docker-compose file, we don’t require you to have any specific Java version (the SQ image contains everything you need to bootstrap the SQ app).
What’s your docker version? There was a error like this when running a more recent Alpine on a old docker version that the seccomp filter would denie a required system call of elasticsearch. Maybe you have a outdated docker runtime that you can just upgrade.
Your docker-engine version is indeed pretty old. Just for future reference, the fix to similar problems one would need either to upgrade the docker engine (preferred way) or use one of the following workarounds:
Change the default action in your seccomp profile (line 2) to return SCMP_ACT_TRACE instead of SCMP_ACT_ERRNO. (see @DefinitelyNotTobi’s answer here)
Pass unconfined to run the SQ container without the default seccomp profile (as shown by @linzwelch in the comment above).