Scoop: SonarQube isn't starting

Created on 28 Nov 2017  路  5Comments  路  Source: lukesampson/scoop

Steps:

  1. open commandline
  2. scoop install sonarqube
  3. startSonar

Console log:

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    | 2017.11.28 16:41:38 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\yorel\scoop
\apps\sonarqube\current\temp
jvm 1    | 2017.11.28 16:41:38 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2017.11.28 16:41:38 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenam
ePrefix=es]] from [C:\Users\yorel\scoop\apps\sonarqube\current\elasticsearch]: C:\Program Files\Java\jdk1.8.0_152\jre\bi
n\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTo
uch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=
true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.sh
utdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryErr
or -Delasticsearch -Des.path.home=C:\Users\yorel\scoop\apps\sonarqube\current\elasticsearch -cp lib/* org.elasticsearch.
bootstrap.Elasticsearch -Epath.conf=C:\Users\yorel\scoop\apps\sonarqube\current\temp\conf\es
jvm 1    | 2017.11.28 16:41:38 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | 2017.11.28 16:41:39 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2017.11.28 16:41:39 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin
]
jvm 1    | 2017.11.28 16:41:40 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1    | 2017.11.28 16:41:40 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1    | 2017.11.28 16:41:40 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped
help wanted package-update

Most helpful comment

In addition to @brandon93s comment I had to add a further line with delete permissions for the folder (elastic search needs to delete files too):

permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/persist/sonarqube/-", "read";
permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/persist/sonarqube/-", "write";
permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/persist/sonarqube/-", "delete";
permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/apps/sonarqube/-", "read";

All 5 comments

Can you take a look in C:\Users\yorel\scoop\persist\sonarqube\logs\es.log for more details? This is usually a java.security.AccessControlException because reading and writing from outside of the deployment directory is blocked by default. If that's the case, you'd need to add exception rules to your java.policy:

permission java.io.FilePermission "C:/Users/yorel/scoop/persist/sonarqube/-", "write";
permission java.io.FilePermission "C:/Users/yorel/scoop/persist/sonarqube/-", "read";
permission java.io.FilePermission "C:/Users/yorel/scoop/apps/sonarqube/-", "read";  

If you're using openjdk via scoop, the policy is located here at C:\Users\yorel\scoop\apps\openjdk\current\jre\lib\security\java.policy.

In addition to @brandon93s comment I had to add a further line with delete permissions for the folder (elastic search needs to delete files too):

permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/persist/sonarqube/-", "read";
permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/persist/sonarqube/-", "write";
permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/persist/sonarqube/-", "delete";
permission java.io.FilePermission "C:/Users/Richard.Mayes/scoop/apps/sonarqube/-", "read";

That's because the URL points to a zip that doesn't contain all the needed files. Also I'm unsure that it's official.

Current

https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-7.3.zip

Should use instead:

https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.3.zip

SHAs are also available here too.

Something has been changed since @brandon93s and @caveman-dick workarounds.

Now if you want to start sonarqube you have to add some new lines. I'm writing here the whole collection of rules to add into the java.policy to avoid confusion.

permission java.io.FilePermission "C:/Users/BrigantiAn/scoop/persist/sonarqube/-", "write"; permission java.io.FilePermission "C:/Users/BrigantiAn/scoop/persist/sonarqube/-", "read"; permission java.io.FilePermission "C:/Users/BrigantiAn/scoop/persist/sonarqube/-", "delete"; permission java.io.FilePermission "C:/Users/BrigantiAn/scoop/apps/sonarqube/-", "read"; permission java.io.FilePermission "C:/Users/BrigantiAn/scoop/apps/sonarqube/-", "write"; permission java.io.FilePermission "C:/Users/BrigantiAn/scoop/apps/sonarqube/-", "delete"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.annotation", "read"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.annotation", "write"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.annotation", "delete";

This issue belongs in the Main bucket. Unfortunately, we cannot move this issue on this end, so it is being closed.
If this is still an issue, please create a new issue in the Main bucket via https://github.com/ScoopInstaller/Main/issues/new?body=Moved+from+https%3A%2F%2Fgithub.com%2Flukesampson%2Fscoop%2Fissues%2F1882

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bernstein82 picture bernstein82  路  3Comments

thorstenkampe picture thorstenkampe  路  3Comments

mpro7 picture mpro7  路  3Comments

SlvrEagle23 picture SlvrEagle23  路  3Comments

brunovieira97 picture brunovieira97  路  3Comments