6

We tried to install and see features of LTS sonarqube-6.7.2. When I started sonarqube it failed to start and throwing up an error in sonar.log as below.

To make sure Elastic search memory I run command as mentioned here sonarqube-es, which was sysctl -w vm.max_map_count=262144. Is the issue with Elastic search memory or server space memory?

 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp 
      directory/opt/sonar/sonarqube-6.7.2/temp
 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', 
ipcIndex=1,logFilenamePrefix=es]]fromopt/sonar/sonarqube6.7.2/elasticsearch]:/opt/sonar/sonarqube6.7.2/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonar/sonarqube-6.7.2/temp/conf/es
 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
 INFO  app[][o.e.p.PluginsService] no modules loaded
 INFO  app[][o.e.p.PluginsService] loaded plugin 
 [org.elasticsearch.transport.Netty4Plugin]
 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', 
 ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonar/sonarqube-6.7.2]: 
 /usr/java/jdk1.8.0_101/jre
 /bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -
 Djava.io.tmpdir=/opt/sonar/sonarqube-6.7.2/temp -Xmx512m -Xms128m -
 XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:./lib/serv
 er/*:/opt/sonar/sonarqube-6.7.2/lib/jdbc/h2/h2-1.3.176.jar 
 org.sonar.server.app.WebServer /opt/sonar/sonarqube-6.7.2/temp/sq-
 process7891544648476349877properties
 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value 
 [es]: 143
 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
 <-- Wrapper Stopped

Also es.log

 WARN  es[][o.e.b.BootstrapChecks] max file descriptors [4096] for 
 elasticsearch process is too low, increase to at least [65536]
 1 INFO  es[][o.e.c.s.ClusterService] new_master {sonarqube}
{NRF09Q0aSau2jbr7-dbo7w}{WOHhcKq8Qrqjrm6kEc0QZg}{127.0.0.1}{127.0.0.1:9001}
{rack_id=sonarqube}, reason: zen-disco-elected-as-master ([0] nodes joined)
INFO  es[][o.e.n.Node] started
INFO  es[][o.e.g.GatewayService] recovered [8] indices into cluster_state
INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from 
[RED] to [GREEN] (reason: [shards started [[metadatas][0]] ...]).
INFO  es[][o.e.n.Node] stopping ...
INFO  es[][o.e.n.Node] stopped
INFO  es[][o.e.n.Node] closing ...
INFO  es[][o.e.n.Node] closed
INFO  es[][o.e.n.Node] initializing ...
INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt 
(/dev/mapper/rootvg-opt_lv)]], net usable_space [4.3gb], net total_space [ 
4.9gb], spins? [possibly], types [xfs]
INFO  es[][o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary 
object pointers [true]
INFO  es[][o.e.n.Node] node name [sonarqube], node ID [NRF09Q0aSau2jbr7-
dbo7w]
INFO  es[][o.e.n.Node] version[5.6.3], pid[47816], build[1a2f265/2017-10-
06T20:33:39.012Z], OS[Linux/3.10.0-327.el7.x86_64/amd64], JVM[Oracle 
Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_101/25.101-b13]
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=tr
ue, -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/sonar/sonarqube-6.7.2/elasticsearch]
INFO  es[][o.e.p.PluginsService] loaded module [aggs-matrix-stats]
INFO  es[][o.e.p.PluginsService] loaded module [ingest-common]
INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
INFO  es[][o.e.p.PluginsService] loaded module [percolator]
INFO  es[][o.e.p.PluginsService] loaded module [reindex]
INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
INFO  es[][o.e.p.PluginsService] no plugins loaded
15:51:43 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen]
15:51:44 INFO  es[][o.e.n.Node] initialized
15:51:44 INFO  es[][o.e.n.Node] starting ...
INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, 
bound_addresses {127.0.0.1:9001}
WARN  es[][o.e.b.BootstrapChecks] max file descriptors [4096] for 
elasticsearch process is too low, increase to at least [65536]
INFO  es[][o.e.c.s.ClusterService] new_master {sonarqube}{NRF09Q0aSau2jbr7-
dbo7w}{UVPJWQbGSdKpQJZ9dZRwCA}{127.0.0.1}{127.0.0.1:9001}
{rack_id=sonarqube}, 
reason: zen-disco-elected-as-master ([0] nodes joined)
INFO  es[][o.e.n.Node] started
INFO  es[][o.e.g.GatewayService] recovered [8] indices into cluster_state
INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from 
[RED] to [GREEN] (reason: [shards started [[metadatas][0], [components][0]] 
...]).
INFO  es[][o.e.n.Node] stopping ...
INFO  es[][o.e.n.Node] stopped
INFO  es[][o.e.n.Node] closing ...
INFO  es[][o.e.n.Node] closed
halfer
  • 19,824
  • 17
  • 99
  • 186
  • Can you post your sonar.log files ? – Eric Hartmann Mar 02 '18 at 07:10
  • First block of log is sonar.log @EricHartmann –  Mar 02 '18 at 17:18
  • 2
    my bad the first process to stop is the web, can you add this web.log file (I meant this one) ? – Eric Hartmann Mar 03 '18 at 06:45
  • Thanks for your comments@EricHartmann but unfortunately i dont have those log file. –  Mar 06 '18 at 03:29
  • Can you try restarting SonarQube and look at this file, the error should be there ? – Eric Hartmann Mar 06 '18 at 07:02
  • Same situation also for me: upgraded db schema from 6.5 (MS SQL 2014), web server stopped with app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143.... any idea? – carloreggiani Mar 08 '18 at 08:49
  • @carloreggiani Is your MS SQl Database has this property SQL_Latin1_General_CP1_CS_AS ? –  Mar 08 '18 at 14:31
  • @EricHartmann We have destroyed that server so I dont have those logs to provide. I am really sorry. And we installed sonarqube in New server and looks like it is working fine –  Mar 08 '18 at 14:32
  • @pandey all fine on MS SQL. I resolved moving the same configuration on another server with more free disk space (more than 25G) and al worked fine. The problem seems to be the free disk space for es used in version 6.7.x! – carloreggiani Mar 09 '18 at 16:23
  • Cool@carloreggiani –  Mar 09 '18 at 19:36
  • I had the same error message and found the error in web.log. There's something wrong with my database credentials. – Anna Ira Hurnaus Mar 23 '18 at 16:04
  • How much free disk space did you need? I am seeing the same problem, but I don't see any drives that are low on disk space. I am also working from an upgraded database, using postgresql 9.2.21-1 on centos 7. – John Elion Apr 16 '18 at 11:35
  • @carloreggiani is see 25G is what you recommend. For what? My /opt drive (where Sonarqube is installed) has 45G available. I do see a number of devtmpfs and tmpfs drives that are somewhat more limited (3.9G), but I don't see any relevant file systems on these (/dev, /dev/shm, /run, /sys/fs/cgroup, and /run/user/1000). I'm not sure what these are or how there got set that way, do you think they are relevant? – John Elion Apr 16 '18 at 11:59

1 Answers1

1

In my case, found out it was happening due to port conflict with Kafka.

SonarQube uses the embedded DB as a default DB, and its default port is 9092, which is also Kafka's default port (saw the error in sonarqube/logs/web.log, "java.net.BindException: Address already in use").

The fix: Uncomment and change the port of the attribute "sonar.embeddedDatabase.port" to something other than 9092.

trex
  • 325
  • 3
  • 8