Make sure to tell us:
-
What version are you upgrading from?- 9.1 to 9.9 LTS
-
System information (Operating system, Java version, Database provider/version)
– OS: NAME=“Amazon Linux”
VERSION="2
ID=“amzn”
ID_LIKE=“centos rhel fedora”
VERSION_ID=“2”
PRETTY_NAME=“Amazon Linux 2”
ANSI_COLOR=“0;33”
CPE_NAME=“cpe:2.3:o:amazon:amazon_linux:2”
Java17
DB: Postgres 10 -
What’s the issue you’re facing?
Post starting sonar its gets automatically killed. Elastichsearch exited with 1 as per logs.
Logs:
tail -f es.log
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) ~[elasticsearch-cli-7.17.8.jar:7.17.8]
at org.elasticsearch.cli.Command.main(Command.java:77) ~[elasticsearch-cli-7.17.8.jar:7.17.8]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125) ~[elasticsearch-7.17.8.jar:7.17.8]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) ~[elasticsearch-7.17.8.jar:7.17.8]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:107) ~[elasticsearch-7.17.8.jar:7.17.8]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183) ~[elasticsearch-7.17.8.jar:7.17.8]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434) ~[elasticsearch-7.17.8.jar:7.17.8]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169) ~[elasticsearch-7.17.8.jar:7.17.8]
… 6 more
tail -f sonar.log
2023.10.17 13:10:22 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.10.17 13:10:22 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.10.17 13:10:22 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
2023.10.17 13:24:37 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /apps/sonarqube/temp
2023.10.17 13:24:37 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:46417]
2023.10.17 13:24:38 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/apps/sonarqube/elasticsearch]: /apps/sonarqube/elasticsearch/bin/elasticsearch
2023.10.17 13:24:38 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.10.17 13:24:41 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.10.17 13:24:41 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.10.17 13:24:41 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
tail -f nohup.log
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
For complete error details, refer to the log at /apps/sonarqube/logs/sonarqube.log
2023.10.17 13:24:41 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.10.17 13:24:41 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.10.17 13:24:41 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped