Reputation: 944
I am trying to start SonarQube 7.5 and (per the online documentation) I tried to change the ElasticSearch storage path to a dedicated volume (Z:\data) by editing sonar.properties with the following lines:
# Paths to persistent data files (embedded database and search index) and temporary files.
# Can be absolute or relative to installation directory.
# Defaults are respectively <installation home>/data and <installation home>/temp
sonar.path.data=Z:\data
sonar.path.temp=Z:\temp
I'm getting the following error when I try to start.
PS C:\> &"C:\sonarqube-7.5\bin\windows-x86-64\StartSonar.bat"
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.io.IOException: Unable to create directory C:\sonarqube-7.5\Z:data
jvm 1 | java.io.IOException: Unable to create directory C:\sonarqube-7.5\Z:data
jvm 1 | at org.apache.commons.io.FileUtils.forceMkdir(FileUtils.java:2491)
jvm 1 | at org.sonar.application.AppFileSystem.createDirectory(AppFileSystem.java:80)
jvm 1 | at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:59)
jvm 1 | at org.sonar.application.App.start(App.java:55)
jvm 1 | at org.sonar.application.App.main(App.java:78)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.base/java.lang.Thread.run(Thread.java:834)
wrapper | <-- Wrapper Stopped
Press any key to continue . . .
What is the correct way to change the sonar.path.data (and sonar.path.temp) to a dedicated volume?
EDIT: Thanks to Simon Schrottner I am now getting an entirely different error.
--> 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.
WrapperSimpleApp: Encountered an error running main: java.io.IOException:
Unable to create directory Z:\data
java.io.IOException: Unable to create directory Z:\data
at org.apache.commons.io.FileUtils.forceMkdir(FileUtils.java:2491)
at org.sonar.application.AppFileSystem.createDirectory(AppFileSystem.java:80)
at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:59)
at org.sonar.application.App.start(App.java:55)
at org.sonar.application.App.main(App.java:78)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.base/java.lang.Thread.run(Thread.java:834)
<-- Wrapper Stopped
The rest, I think, is a permissions issue with Azure and beyond the scope of my original questions. Simon, if you'd post your suggestion as an Answer I can mark it as correct.
Upvotes: 1
Views: 1866
Reputation: 4754
It looks like you are using the wrong path delimiter.
As already mentioned in the comments - i highly suggest to use /
(forward slash) instead of \
(backward slash)
although windows is using normally a backward slash, this might not work with sonarqube. Java itself provides an own static field to determine/use the right separator File.separator
Upvotes: 1
Reputation: 1390
Per the comments, you should use a forward slash instead of back slash.
The value of your property should be:
sonar.path.data=Z:/data
Upvotes: 2