Sonarqube failed to start with ./sonar.sh console

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    sonarqube-8.2.0

Hi, i’m using sonarqube with AWS RDS PostgreSQL for 6 months. Previously, i took down sonarqube, but now i’m setting up it again with the same database. When i try to run ./sonar.sh console, i got below error :
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM…
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2020.04.30 07:20:53 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /home/ec2-user/sonarqube-8.2.0.32929/temp
jvm 1 | 2020.04.30 07:20:54 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2020.04.30 07:20:54 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/home/ec2-user/sonarqube-8.2.0.32929/elasticsearch]: /home/ec2-user/sonarqube-8.2.0.32929/elasticsearch/bin/elasticsearch
jvm 1 | 2020.04.30 07:20:54 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2020.04.30 07:20:54 INFO app[o.e.p.PluginsService] no modules loaded
jvm 1 | 2020.04.30 07:20:54 INFO app[o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2020.04.30 07:21:08 INFO app[o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2020.04.30 07:21:08 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [/home/ec2-user/sonarqube-8.2.0.32929]: /usr/lib/jvm/java-11-openjdk-11.0.5.10-0.amzn2.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/home/ec2-user/sonarqube-8.2.0.32929/temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/common/:/home/ec2-user/sonarqube-8.2.0.32929/lib/jdbc/postgresql/postgresql-42.2.8.jar org.sonar.server.app.WebServer /home/ec2-user/sonarqube-8.2.0.32929/temp/sq-process12821636376476933213properties
jvm 1 | 2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2020.04.30 07:21:13 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
wrapper | <-- Wrapper Stopped

Checking to another log :
tail -f es.log
2020.04.30 07:21:04 INFO es[o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2020.04.30 07:21:04 INFO es[o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2020.04.30 07:21:07 INFO es[o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{eSfI4eJtRYS_0dltGe3TIg}{a2AEk59SQQGDHWG8AlPSxw}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
2020.04.30 07:21:07 INFO es[o.e.c.s.ClusterApplierService] new_master {sonarqube}{eSfI4eJtRYS_0dltGe3TIg}{a2AEk59SQQGDHWG8AlPSxw}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{eSfI4eJtRYS_0dltGe3TIg}{a2AEk59SQQGDHWG8AlPSxw}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
2020.04.30 07:21:07 INFO es[o.e.n.Node] started
2020.04.30 07:21:07 INFO es[o.e.g.GatewayService] recovered [0] indices into cluster_state
2020.04.30 07:21:13 INFO es[o.e.n.Node] stopping …
2020.04.30 07:21:13 INFO es[o.e.n.Node] stopped
2020.04.30 07:21:13 INFO es[o.e.n.Node] closing …
2020.04.30 07:21:13 INFO es[o.e.n.Node] closed

sonar.log
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

2020.04.30 07:20:54 INFO app[o.e.p.PluginsService] no modules loaded

2020.04.30 07:20:54 INFO app[o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]

2020.04.30 07:21:08 INFO app[o.s.a.SchedulerImpl] Process[es] is up

2020.04.30 07:21:08 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [/home/ec2-user/sonarqube-8.2.0.32929]: /usr/lib/jvm/java-11-openjdk-11.0.5.10-0.amzn2.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/home/ec2-user/sonarqube-8.2.0.32929/temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/common/:/home/ec2-user/sonarqube-8.2.0.32929/lib/jdbc/postgresql/postgresql-42.2.8.jar org.sonar.server.app.WebServer /home/ec2-user/sonarqube-8.2.0.32929/temp/sq-process12821636376476933213properties

2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped

2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped

2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

2020.04.30 07:21:13 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143

<-- Wrapper Stopped

tail -f web.log

java.base@11.0.5/sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:120)

java.base@11.0.5/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)

java.base@11.0.5/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)

app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)

app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)

app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)

app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)

java.base@11.0.5/java.lang.Thread.run(Thread.java:834)

2020.04.30 07:21:13 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000

2020.04.30 07:21:13 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process

Question :
How to solve this?

The last 10 lines of a log file don’t tell us a lot! But at least we know the Web Server shut down first.

jvm 1 | 2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2020.04.30 07:21:13 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped

This means more information should be in the web.log file. Have a look at the full content!

2 posts were split to a new topic: SonarQube fails to start