andyd February 2016

Unable to run SonarQube 5.3 as a service on Windows

I'm unable to run SonarQube 5.3 as a service on Windows Server 2012 or windows 10. It runs fine using StartSonar.bat but when installed and run as a service there is the error

"The SonarQube service on Local Computer started then stopped. Some services stop automatically if they are not in use by other services or programs."

I've tried a specific service user with local admin access and the "Local System account" user with the same result.

I have tested starting the service specifying a desktop user with Local Administrator access which works OK but our policy is to use a specific service user for services.

I've tried using JDK 8 64bit and JDK 7 32 bit with the same results

Ther contents of sonar.log are

Using tick timer.
--> Wrapper Started as Service
server listening on port 32000.
Launching a JVM...
command: "C:\Program Files\Java\jdk1.8.0_72\bin\java.exe" -Djava.awt.headless=true -Xms3m -Xmx3m -Djava.library.path="./lib" -classpath "../../lib/jsw/wrapper-3.2.3.jar;../../lib/sonar-application-5.3.jar" -Dwrapper.key="Rfo5GpLfYyokZuoo" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.debug="TRUE" -Dwrapper.pid=7932 -Dwrapper.version="3.2.3" -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.sonar.application.App
JVM started (PID=3388)
WrapperManager class initialized by thread: main  Using classloader: sun.misc.Launcher$AppClassLoader@5c647e05
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

Wrapper Manager: JVM #1
Running a 64-bit JVM.
Wrapper Manager: Registering shutdown hook
Wrapper Manager: Using wrapper
Load native library.  One or more attempts may fail if platform specific libraries do not exist.
Loading native library failed: wrapper-windows-x86-64.dll  Cause:         

Answers


andyd February 2016

With the windows service user added locally and given desktop interaction priviliges I can now start the SonarQube service.


user1187983 February 2016

Configure SonarQube service to not use the Local System account, but another user with more privileges.

See
Running SonarQube as a Service on Windows
Migrate SonarQube from Tomcat to a Windows service

Post Status

Asked in February 2016
Viewed 3,272 times
Voted 6
Answered 2 times

Search




Leave an answer