我目前正在尝试安装SonarQube。按照其页面上的说明操作时,我按照说明运行 InstallNTService.bat 和 StartNTService.bat 。
类似于this (stackoverflow)帖子,它说
wrapper | Starting the SonarQube service...
wrapper | The SonarQube service was launched, but failed to start.
错误日志文件说:
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.
我不知道为什么会失败。
提前谢谢!
修改
This页面描述了我无法使用的问题的解决方案,因为右键单击服务上的下拉菜单不可用。
答案 0 :(得分:2)
我在日志中找到以下内容,因此我按照此处的说明更改了具有本地管理员权限的帐户,并且可以正常运行:http://docs.sonarqube.org/display/SONAR/Running+SonarQube+as+a+Service+on+Windows
WrapperSimpleApp:遇到运行main的错误:java.lang.IllegalStateException:临时目录不可写:C:\ Windows \ system32 \ config \ systemprofile \ AppData \ Local \ Temp \
答案 1 :(得分:2)
您必须将服务帐户(按此link配置)添加到运行声纳qube服务的计算机的本地管理员组
答案 2 :(得分:1)
打开“ \ conf \ wrapper.conf:”文件 替换
wrapper.java.command = java
使用
wrapper.java.command = C:\ Program Files \ Java \ jdk-11.0.6 \ bin \ java
答案 3 :(得分:0)
我遇到了同样的错误。我的解决方案是验证java x64 JDK是否已安装 - 问题就消失了。
答案 4 :(得分:0)
我遇到了同样的问题,在遵循以上所有要点后得到解决,即 一个。确保服务在管理员登录时运行 湾JDK使用管理员登录
安装答案 5 :(得分:0)
转到C:\ Sonar \ conf \ wrapper.conf通过记事本++打开更改wrapper.java.command =%JAVA_HOME%/ java 到您的Java安装路径
答案 6 :(得分:0)
我的组织安装了32位Java,该Java添加了C:\ ProgramData \ Oracle \ Java \ javapath作为默认Java路径。我定义了 JAVA_HOME ,并将%JAVA_HOME%\ bin; 添加到了SonarQube的类路径的开头,以使用我安装的64位版本的Java。
https://douglascayers.com/2015/05/30/how-to-set-custom-java-path-after-installing-jdk-8/