Sonarqube Not Starting in Linux Centos Rhel Docker-Solved

Sonarqube Not Starting in Linux Centos Rhel Docker-Solved

common errors while launching sonarqube server

2018.08.01 07:51:49 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [web]: 1
2018.08.01 07:51:49 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.08.01 07:51:49 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.01 07:51:49 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
2018.08.01 07:51:49 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError:
Java heap space

exec: “./bin/run.sh”: stat ./bin/run.sh: no such file or directory
Error response from daemon: Container command not found or does not exist.

you can refer here how to launch sonarqube sever with mysql or any other database Sonarqube Installation on centos 7/Rhel

SOLUTIONS:

Ram Size:

most of the times sonarqube server will not start because of heap size. You need minimum 2gb of ram to start sonarqube server. if you are launching sonarqube server in amazon ec2 instance take t2 medium or higher than that. whatever the error you get first you need minimum ram size to work with sonarqube server.

can not run elasticsearch as root.

we cannot run the newer versions of sonarqube as the root user. Create a new user for SonarQube. Since we are running SonarQube as a separate user, assign proper ownership to SonarQube files.

useradd sonarqube
passwd sonarqube
chown -R sonarqube:sonarqube /opt/sonarqube

Open the SonarQube startup script and specify the sonarqube user details.
vi /opt/sonarqube/bin/linux-x86-64/sonar.sh
#add below line
RUN_AS_USER=sonarqube

sonarqube container not starting 

most common errors while launching sonarqube container

Sonarqube docker container fails to restart. cannot access ‘/opt/sonarqube/temp/README.txt’: No such file or directory
Cannot start sonarqube with mysql

java.io.IOException: Failed to run image ‘sonarqube’. Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused “exec: \”./bin/run.sh\”: stat ./bin/run.sh: no such file or directory”: unknown.

you can refer here we exlplianed How to Launch Sonarqube container with mysql 

SOLUTIONS

Ram

to start sonarqube container you need minimum 2gb of ram. so make sure that you have minimum 2gb of ram. if you are trying to install sonarqube container without 2gb ram you will get lot of errors. you can see in the logs we need minimum some amount of ram to lunch sonarqube container. you can find that sonarqube heap size in sonarqube properties file.

Connecting with mysql:

after launching mysql container you need to create db and user for sonarqube. while creating db,user and granting permissions you may get errors. like syntax is not valid or grant permissions not allowed for root user. these errors you will get because of mysql version. so try with different versions of mysql images. or if you are good at mysql letest versions syntax then you can execute commands as we expected and you can connect it to sonarqube.

when we are giving permissions to sonarqube user make sure that allowed from anywhere. if you mention localhost then sonarqube canot access mysql since here localhost means mysql container.

docker run commands:

when you are launching docker sonarqube container, with docker run command use correct syntax don’t use localhost, use names of the container.

 

 

 

 

  • sonarqube not starting
  • sonarqube not starting linux
  • sonarqube not starting ubuntu
  • sonarqube not starting elasticsearch
  • sonarqube not starting windows
  • sonarqube server not starting
  • sonarqube container not starting
  • sonarqube service not starting

Leave a Reply

Your email address will not be published. Required fields are marked *