We are currently running SonarQube 5.2 and are performing a test upgrade to SonarQube 5.6, we have had this issue with Sonar 5.4 as well, but never upgraded in production.
When we use the same service account on the same server in the same root directory, the service is unable to start. It claims it is unable to get a node lock, always on the same file and directory, node 49, which is the last one of the nodes. The file and folder are successfully created.
The service account has full permissions on the D:\Sonar folder and all folders below.
I have tested and confirmed that the service does start up when i make it a local administrator, but this is not desired, so i am looking for the required permissions to start up the service. The service also starts if i configure it as local system, but we dont want this either.
What more permissions should i give to the SonarQube Service Account in order to start up ?
Any advise is welcome.
Nico
2016.06.10 14:42:32 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\Sonar\sonarqube-5.6\temp
2016.06.10 14:42:32 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_91\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=D:\Sonar\sonarqube-5.6\temp -javaagent:C:\Program Files\Java\jre1.8.0_91\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer D:\Sonar\sonarqube-5.6\temp\sq-process3739686975987017449properties
2016.06.10 14:42:34 INFO es[o.s.p.ProcessEntryPoint] Starting es
2016.06.10 14:42:34 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9006
2016.06.10 14:42:34 INFO es[o.elasticsearch.node] [sonar-1465562551839] version[1.7.5], pid[29336], build[00f95f4/2016-02-02T09:55:30Z]
2016.06.10 14:42:34 INFO es[o.elasticsearch.node] [sonar-1465562551839] initializing ...
2016.06.10 14:42:34 INFO es[o.e.plugins] [sonar-1465562551839] loaded [], sites []
2016.06.10 14:42:35 WARN es[o.s.p.ProcessEntryPoint] Fail to start es
org.elasticsearch.ElasticsearchIllegalStateException: Failed to obtain node lock, is the following location writable?: [D:\Sonar\sonarqube-5.6\data\es\sonarqube]
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:164) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.node.internal.InternalNode.<init>(InternalNode.java:165) ~[elasticsearch-1.7.5.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:45) [sonar-search-5.6.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:102) ~[sonar-process-5.6.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:81) [sonar-search-5.6.jar:na]
Caused by: java.io.IOException: failed to obtain lock on D:\Sonar\sonarqube-5.6\data\es\sonarqube\nodes\49
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:151) ~[elasticsearch-1.7.5.jar:na]
... 4 common frames omitted
Caused by: java.nio.file.AccessDeniedException: D:\Sonar\sonarqube-5.6\data\es\sonarqube\nodes\49
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsFileStore.create(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsFileSystemProvider.getFileStore(Unknown Source) ~[na:1.8.0_91]
at java.nio.file.Files.getFileStore(Unknown Source) ~[na:1.8.0_91]
at org.elasticsearch.env.NodeEnvironment.getFileStore(NodeEnvironment.java:262) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.env.NodeEnvironment.access$000(NodeEnvironment.java:62) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:75) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:140) ~[elasticsearch-1.7.5.jar:na]
... 4 common frames omitted
<-- Wrapper Stopped