Unable to get SonarQube started

Hi,

I’m trying to install the latest version of SonarQube (7.4, I just downloaded it a few weeks ago) on a linux system. I’ve been working my way through issues by reading the logs, but I’m finally stumped. I’m getting the generic error:

2018.12.27 09:41:22 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143

Looks like everything is going good in es.log

2018.12.27 09:41:10 INFO  es[][o.e.n.Node] initializing ...
2018.12.27 09:41:10 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt/sonarqube (/dev/mapper/vg00-SonarQ)]], net usable_space [800mb], net total_space [1014mb], spins? [possibly], types [xfs]
2018.12.27 09:41:10 INFO  es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true]
2018.12.27 09:41:10 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [dHwlObJyQxSG7ZqHX1LxkQ]
2018.12.27 09:41:10 INFO  es[][o.e.n.Node] version[5.6.3], pid[2313], build[1a2f265/2017-10-06T20:33:39.012Z], OS[Linux/3.10.0-862.14.4.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_191/25.191-b12]
2018.12.27 09:41:10 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] loaded module [aggs-matrix-stats]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] loaded module [ingest-common]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2018.12.27 09:41:10 INFO  es[][o.e.p.PluginsService] no plugins loaded
2018.12.27 09:41:11 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen]
2018.12.27 09:41:12 INFO  es[][o.e.n.Node] initialized
2018.12.27 09:41:12 INFO  es[][o.e.n.Node] starting ...
2018.12.27 09:41:12 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2018.12.27 09:41:15 INFO  es[][o.e.c.s.ClusterService] new_master {sonarqube}{dHwlObJyQxSG7ZqHX1LxkQ}{ivCpUikGTWSOWMxwwpCvBg}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: zen-disco-elected-as-master ([0] nodes joined)
2018.12.27 09:41:15 INFO  es[][o.e.n.Node] started
2018.12.27 09:41:15 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2018.12.27 09:41:22 INFO  es[][o.e.n.Node] stopping ...
2018.12.27 09:41:22 INFO  es[][o.e.n.Node] stopped
2018.12.27 09:41:22 INFO  es[][o.e.n.Node] closing ...
2018.12.27 09:41:22 INFO  es[][o.e.n.Node] closed

Over in web.log - it’s connecting to the PostgreSQL database and I think everything is fine there is lots of data about setting up the database, the end of the log file looks like:

2018.12.27 09:41:20 INFO  web[][DbMigrations] Executed DB migrations: success | time=1190ms
2018.12.27 09:41:20 INFO  web[][o.s.s.p.Platform] Database has been automatically updated
2018.12.27 09:41:20 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.ws.WebServiceFilter@28964e97 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/properties*, ...]}]

I now have an access.log file but there is nothing in it. I’m at a total loss as to what to do next because I can’t find an error message to go fix. Everything I have found on Stack Overflow or here has had an error message in one of these log files.

Any help would be appreciated.

Hello,

FYI SonarQube 7.5 has been released last week, you probably want to use it instead. If it still don’t work can you share the full log files please?

Also, is it a fresh install or are you updating from an older version?

Benoit

It’s a fresh install. I’ll update and try again.

Thanks

Okay,

I’ve upgraded to the latest version 7.5 and now I have something that I can work with, but I’m still a bit confused.

I’m now seeing:

2018.12.27 14:17:50 INFO  web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8
2018.12.27 14:17:50 INFO  web[][o.s.s.p.Platform] Database needs migration

However, when I go into postgres - I think I have it setup correctly:

postgres=# \l postgres
                                  List of databases
   Name   |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
----------+----------+----------+-------------+-------------+------------------------
 postgres | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres          +
          |          |          |             |             | postgres=CTc/postgres +
          |          |          |             |             | sonarqube=CTc/postgres
(1 row)

postgres=# SHOW SERVER_ENCODING;
 server_encoding
-----------------
 UTF8
(1 row)

Is there something else that I should be checking or need to configure here to make sure that it is UTF8?

Ann

Your database is correctly configured.

The log message:

2018.12.27 14:17:50 INFO web[…] Verify that database charset supports UTF8

means that SonarQube is currently checking if the database charset supports UTF-8. It is not asking you to verify it. If there isn’t a warning or error log right after, your database is correctly setup. Generally speaking, log of level INFO means that everything is fine and do not requires any action.
Although I agree we could reword this message to avoid confusion.

Benoit