Sonar failed to run analysis, attempted update now failing

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

  • what are you trying to achieve
    Have analyses run

  • what have you tried so far to achieve this

reindex, run vacuum, restart server, attempt upgrade

Problem

Sonar was failing to run the ‘second’ part of analyses, failing with an error like

org.sonar.server.computation.task.projectanalysis.component.VisitException: Visit of Component
...
InvalidArgumentException: Couldn't find root component with uuid 'AV8lhoe9pnaYwVjSy7j'

I failed to copy the error down before attempting more things.

  • First thing we tried was verifying that there was enough room on the server, etc.
  • Then we attempted a reindex for ES.
  • Then we attempted an upgrade from 6.7.5 -> 6.7.6

The upgraded server now fails to start. here are the logs:

es.log

2019.05.07 20:06:50 INFO  es[][o.e.n.Node] initializing ...
2019.05.07 20:06:51 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [9.9gb], net total_space [15.6gb], spins? [no], types [ext4]
2019.05.07 20:06:51 INFO  es[][o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary object pointers [true]
2019.05.07 20:06:51 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [Ztjmm_o3TNW5n9NaG4IN6Q]
2019.05.07 20:06:51 INFO  es[][o.e.n.Node] version[5.6.3], pid[13734], build[1a2f265/2017-10-06T20:33:39.012Z], OS[Linux/4.4.0-98-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b11]
2019.05.07 20:06:51 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/services/sonar/elasticsearch]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] loaded module [aggs-matrix-stats]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] loaded module [ingest-common]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2019.05.07 20:06:51 INFO  es[][o.e.p.PluginsService] no plugins loaded

sonar.log

2019.05.07 20:06:49 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/services/sonar/temp
2019.05.07 20:06:49 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.05.07 20:06:49 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/services/sonar/elasticsearch]: /opt/services/sonar/elasticsearch/bin/elasticsearch -Epath.conf=/opt/services/sonar/temp/conf/es
2019.05.07 20:06:49 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.05.07 20:06:49 INFO  app[][o.e.p.PluginsService] no modules loaded
2019.05.07 20:06:49 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.05.07 20:06:51 INFO  app[][o.s.a.SchedulerImpl] Stopping SonarQube
2019.05.07 20:06:51 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2019.05.07 20:06:51 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2019.05.07 20:06:51 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
<-- Wrapper Stopped

sysctl

May 07 17:56:03 ip-172-30-48-45 systemd[1]: Started SonarQube.
May 07 17:56:03 ip-172-30-48-45 su[6633]: Successful su for svcsonar by root
May 07 17:56:03 ip-172-30-48-45 su[6633]: + ??? root:svcsonar
May 07 17:56:03 ip-172-30-48-45 su[6633]: pam_unix(su:session): session opened for user svcsonar by (uid=0)
May 07 17:56:03 ip-172-30-48-45 sonar[6563]: Starting SonarQube...
May 07 17:56:04 ip-172-30-48-45 sonar[6563]: Started SonarQube.
May 07 17:56:18 ip-172-30-48-45 su[6946]: Successful su for svcsonar by root
May 07 17:56:18 ip-172-30-48-45 su[6946]: + ??? root:svcsonar
May 07 17:56:18 ip-172-30-48-45 su[6946]: pam_unix(su:session): session opened for user svcsonar by (uid=0)
May 07 17:56:18 ip-172-30-48-45 sonar[6875]: Stopping SonarQube...
May 07 17:56:18 ip-172-30-48-45 sonar[6875]: SonarQube was not running.

There are no other logs in the log folder.

Any help would be appreciated.

Ok, we were able to perform the upgrade (permission issues with the svc user for some reason) and it appears the issue has resolved. I’m not sure what resolved it, as we changed nothing before it broke.

A post was split to a new topic: Problem starting SonarQube as service

A post was split to a new topic: Couldn’t find root component with uuid “xyz”

Make sure you have enough space on your database. During the failed upgrade process we noticed that our database was very low on space. So we expanded it and were able to continue with the upgrade process. That could’ve been what was causing our issues to begin with.

1 Like