Issu With ES_JAVA_HOME for upgrading the Sonarqube

I just upgrade the sonarscanner from 7 to latest. My Docker contaniser stop with an error

app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch

could not find java in ES_JAVA_HOME at /usr/lib/jvm/java-11-openjdk/bin/java

I have see the other question but in my case I dont even have ES_JAVA_HOME to change the path. as Shown in picture.

I even create a new env and added the exact path where the java is as Java_Home but still the same error. I am using portanier to manage the contaniers. Can you please help me find where I can change ES_JAVA_HOME path. I dont have dockercompose Or DockerFile.

I am using docker 19.03.5 and upgrading docker is not a option for me as mentioned here . There are so many contaniers and diffrent people are using and I am very new to docker.

Hi @Tauqeer_Ahmad ,

did you already had a look at this thread? if updating your container runtime is not an option, you will need to speficy a custom seccomp profile as stated in the linked thread

hope that helps

Hi Thanks for your reply and yes I already have a look at this, The Problem is this seccomp=/path/to/seccomp/profile.json . The path is not found. I have tried to find any example but no sucess. Can you please tell me where to find this path and if I have to create a new profile then how can I? I am using docker 19 and its linux server.

There is a link to the default seccomp profile in the linked thread with information how to modify it

This modified json needs to be put on your system and referenced. /path/to/seccomp/profile.json is just a placeholder

Guys, THanks a lot for your help. I was confuse with answer. I was lookign for a seccomp/profile.json instad of creating. Just create a new file keep it anwhere in server and give the path. It work.
Alos this command show error request canceled while waiting for
docker run --rm -it --name "test-sonarqube-unique" --security-opt seccomp=/path/to/seccomp/profile.json
So I changed the command with this.
sudo docker run -d --name sonarqube -p 9000:9000 --security-opt seccomp=/home/devops/seccomp/profile.json -e SONAR_JDBC_USERNAME=sonar111 -e SONAR_JDBC_PASSWORD=xxx -v sonarqube_data:/opt/sonarqube/data -v sonarqube_extensions:/opt/sonarqube/extensions -v sonarqube_logs:/opt/sonarqube/logs sonarqube

Now sonarqube is up and running. Thanks a lot help.

1 Like