Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonarqube will not start due to elasticsearch being unable to write yml settings

I install 7.9 version of sonarqube on aws ec2 instance and it is running fine. due to not compatible with my code i am upgrading to latest version 8.3. i download zip and unzip it. after stoping older version, i try to run it. i am getting error as below.

java.lang.IllegalStateException: Cannot write Elasticsearch yml settings file

Caused by: java.nio.file.AccessDeniedException: /opt/sonarqube/sonarqube-8.3/temp/conf/es/elasticsearch.yml

like image 648
Dharmendra jha Avatar asked Oct 29 '25 08:10

Dharmendra jha


1 Answers

Have you tried to start SonarQube as root in a previous run? If so, the ES config file has been created as root and now when you're trying to start the service as another user it can't overwrite the file.

To fix it, delete the temp folder in your $SONAR_HOME and it should work.

sudo rm -r $SONAR_HOME/temp
like image 140
Cynthia Baran Avatar answered Oct 30 '25 23:10

Cynthia Baran