Sonar configuration service default path problem

When sonar configures the background service, "Temp directory is not writable" appears. Solve the problem: the solution is as follows:

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:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: 系统找不到指定的路径。
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:57)
... 9 more
<-- Wrapper Stopped
The SonarQube service was launched, but failed to start.

Find the wrapper.conf file in the conf directory and open it.
Add under "wrapper.java.additional.1=-Djava.awt.headless=true"

###set temp dir ,solve Temp directory is not writable
wrapper.java.additional.2=-Djava.io.tmpdir=../../temp

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326751162&siteId=291194637