System information (Operating system, Java version, Database provider/version)
What’s the issue you’re facing?
We are getting the below error when trying to start up sonarqube 9.9.9 on a test environement.
We cannot use port 9001 as that is being used by the production instance.
Please see error below
[mcaadmin@ip-10-106-11-46 logs]$ tail sonar.log -f
2024.01.29 15:46:59 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 78
2024.01.29 15:46:59 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.29 15:46:59 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.01.29 15:56:28 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarsource/sonarqube/temp
2024.01.29 15:56:29 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9003, TCP: 127.0.0.1:41759]
2024.01.29 15:56:29 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarsource/sonarqube/elasticsearch]: /opt/sonarsource/sonarqube/elasticsearch/bin/elasticsearch
2024.01.29 15:56:29 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.01.29 15:56:32 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 78
2024.01.29 15:56:32 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.29 15:56:32 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
To get specific errors, you’re better off looking at your other server logs. However, it seems you already know what the problem is:
It’s not clear to me why you would try to run your test instance on the same host as your production instance. However, if you must, then you’ll need to edit the test instance’s $SONARQUBE-HOME/conf/sonar.properties to tell Elasticsearch to use a different port. Perhaps 9002.
Please see below :
[mcaadmin@ip-10-106-11-46 logs]$ tail sonar.log -f
2024.02.05 20:30:30 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarsource/sonarqube/temp
2024.02.05 20:30:30 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:40523]
2024.02.05 20:30:30 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarsource/sonarqube/elasticsearch]: /opt/sonarsource/sonarqube/elasticsearch/bin/elasticsearch
2024.02.05 20:30:30 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.02.05 20:30:33 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 78
2024.02.05 20:30:33 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.02.05 20:30:33 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
Managed to start up the application.
Issue was with bootstrap check failure [1] of [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535].