SonarQube v7.0 unable to start as a service

763 views
Skip to first unread message

kyl...@gmail.com

unread,
Mar 20, 2018, 11:10:26 AM3/20/18
to SonarQube
I upgraded my Windows SonarQube instance from v6.7 to v7.0  and am experiencing issues during startup

Here's the sonar.log as you can see the Service startup fails while the startsonar.bat works

--> Wrapper Started as Service
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2018.03.20 09:45:21 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\SonarQube\temp
2018.03.20 09:45:22 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.03.20 09:45:22 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\SonarQube\elasticsearch]: C:\Program Files\Java\jre1.8.0_151\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -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 -Delasticsearch -Des.path.home=C:\SonarQube\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\SonarQube\temp\conf\es
2018.03.20 09:45:22 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.03.20 09:45:22 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.03.20 09:45:22 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.03.20 09:45:31 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.03.20 09:45:31 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\SonarQube]: C:\Program Files\Java\jre1.8.0_151\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\SonarQube\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;C:\SonarQube\lib\jdbc\mssql\mssql-jdbc-6.2.2.jre8.jar org.sonar.server.app.WebServer C:\SonarQube\temp\sq-process5918161201341647659properties
2018.03.20 09:45:42 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.03.20 09:45:42 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.03.20 09:45:42 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2018.03.20 09:51:54 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\SonarQube\temp
2018.03.20 09:51:54 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.03.20 09:51:54 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\SonarQube\elasticsearch]: C:\Program Files\Java\jre1.8.0_151\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -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 -Delasticsearch -Des.path.home=C:\SonarQube\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\SonarQube\temp\conf\es
2018.03.20 09:51:54 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.03.20 09:51:54 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.03.20 09:51:54 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.03.20 09:52:05 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.03.20 09:52:05 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\SonarQube]: C:\Program Files\Java\jre1.8.0_151\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\SonarQube\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;C:\SonarQube\lib\jdbc\mssql\mssql-jdbc-6.2.2.jre8.jar org.sonar.server.app.WebServer C:\SonarQube\temp\sq-process851037503496174801properties
2018.03.20 09:52:23 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
2018.03.20 09:52:23 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [C:\SonarQube]: C:\Program Files\Java\jre1.8.0_151\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\SonarQube\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;./lib/ce/*;C:\SonarQube\lib\jdbc\mssql\mssql-jdbc-6.2.2.jre8.jar org.sonar.ce.app.CeServer C:\SonarQube\temp\sq-process1135420883081637793properties
2018.03.20 09:52:28 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
2018.03.20 09:52:28 INFO  app[][o.s.a.SchedulerImpl] SonarQube is up


Any help highly appreciated.

Thanks,
George

nicolas...@sonarsource.com

unread,
Mar 21, 2018, 5:31:06 AM3/21/18
to SonarQube
Hi George,

web JVM is failing to start in the first case, so per Troubleshooting documentation I would advise you check in web.log what happens there.

Nicolas

G. Ann Campbell

unread,
Mar 21, 2018, 7:42:41 AM3/21/18
to SonarQube
Hi George,

When you try to run SonarQube as a service, are you using root? Since 6.6, SonarQube can no longer run as root.


Ann

kyl...@gmail.com

unread,
Mar 21, 2018, 6:10:05 PM3/21/18
to SonarQube
@Ann, Thanks for you response. Are you suggesting I should install SonarQube under C:\ProgramFiles ?

@Nicolas, Thanks for the pointer about web.log. Looks like its a database permission issue. I installed SonarQube under my name, while the sonarqube service was configured to running under a system account. So I switched the service to run under my name then the Service Starts. Is there a way to change the database perms?

Really appreciate the timely response

G. Ann Campbell

unread,
Mar 22, 2018, 7:27:20 AM3/22/18
to kyl...@gmail.com, SonarQube
Hi George,

I'm not suggesting anything about where you install it, but about how you run it (not as root).


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/6DL92kg9ry8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/f714f548-7d97-4b73-b87b-e3c6e8998273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kyl...@gmail.com

unread,
Mar 23, 2018, 12:07:35 PM3/23/18
to SonarQube
Thanks Ann, I did change the Service to run under non-root account and it fails during startup. I did grant this user dbo rights to the SonarQube database. Will continue to troubleshoot...
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

kyl...@gmail.com

unread,
Mar 23, 2018, 1:24:18 PM3/23/18
to SonarQube
Issue fixed: Ended up being the Service Account didn't have Full Control of the folder C:\SonarQube. Once I granted the service account full permissions the Windows Service launches successfully.  Appreciate all the help.

G. Ann Campbell

unread,
Mar 23, 2018, 1:33:42 PM3/23/18
to George Nelson, SonarQube
I'm glad you got this working George. Thanks for following up. 


:-)
Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/f8a33b28-98ea-4f69-a983-a5a9068492ee%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages