Reputation: 896
I am currently trying to install SonarQube. When following the instructions on their page, I came to the instruction to run the InstallNTService.bat and StartNTService.bat.
Similar to this (stackoverflow) post, it says
wrapper | Starting the SonarQube service...
wrapper | The SonarQube service was launched, but failed to start.
The error log file says:
The SonarQube service was launched, but failed to start.
Starting the SonarQube service...
--> 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.
WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
The file is located on the path at the following location but
could not be loaded:
C:\tools\sonarqube-5.2\bin\windows-x86-64\.\lib\wrapper.dll
Please verify that the file is readable by the current user
and that the file has not been corrupted in any way.
One common cause of this problem is running a 32-bit version
of the Wrapper with a 64-bit version of Java, or vica versa.
This is a 32-bit JVM.
Reported cause:
C:\tools\sonarqube-5.2\bin\windows-x86-64\lib\wrapper.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
System signals will not be handled correctly.
WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:60)
at org.sonar.process.MinimumViableSystem.checkWritableTempDir(MinimumViableSystem.java:52)
at org.sonar.process.MinimumViableSystem.check(MinimumViableSystem.java:45)
at org.sonar.application.App.main(App.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Das System kann den angegebenen Pfad nicht finden
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(Unknown Source)
at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:57)
... 9 more
<-- Wrapper Stopped
The SonarQube service was launched, but failed to start.
And I don't know why it fails.
Thank you in advance!
EDIT:
This page descibes a solution to the problem that I can't use as the dropdown menu on right button click on the service is not available.
Upvotes: 7
Views: 26037
Reputation: 1
My organization installed 32-bit Java which added C:\ProgramData\Oracle\Java\javapath as the default Java path. I defined JAVA_HOME and added %JAVA_HOME%\bin; to the start of my classpath for SonarQube to use the 64-bit version of Java that I installed.
https://douglascayers.com/2015/05/30/how-to-set-custom-java-path-after-installing-jdk-8/
Upvotes: 0
Reputation: 475
Open "\conf\wrapper.conf:" file replace
wrapper.java.command=java
with
wrapper.java.command=C:\Program Files\Java\jdk-11.0.6\bin\java
Upvotes: 1
Reputation: 31
Goto C:\Sonar\conf\wrapper.conf open via notepad++ change the wrapper.java.command=%JAVA_HOME%/java to your java installation path
Upvotes: 3
Reputation: 1
I was facing the same issue and it got resolved after following all the above points ie a. Making sure the service is running on admin login b. JDK is installed using an admin login
Upvotes: 0
Reputation: 647
I encountered the same error. My solution was to verify that the java x64 JDK was installed - and problem went away.
Upvotes: 0
Reputation: 1625
You have to add service account (which is configured as per this link) to local administrator group of the machine running sonar qube service
Upvotes: 2
Reputation: 2375
I find the following in the log, so I followed the instruction found here to change an account have local admin right, and it works: http://docs.sonarqube.org/display/SONAR/Running+SonarQube+as+a+Service+on+Windows
WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
Upvotes: 2