Unable to start sonar on Windows 2012 Server

Must-share information (formatted with Markdown):

  • SonarQube 7.9.1
  • New install for evaliation
  • Looking through the logs I see the following errors. It seems like Elasticsearch will not start up but I cannot determine what is causing the error. Any suggestions?

sonar.log

2019.09.17 16:27:28 DEBUG app[][o.s.a.e.EsConnectorImpl] Connected to Elasticsearch node: [127.0.0.1:9001]
2019.09.17 16:27:33 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{8He9ZvzNTBaEf-aY-l2MKQ}{127.0.0.1}{127.0.0.1:9001}], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9001] connect_exception

es.log

ERROR es[][o.e.b.Bootstrap] Guice Exception: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
	at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.base/java.security.AccessController.checkPermission(AccessController.java:1036)
	at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:408)
	at java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1324)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:174)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:416)
	at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
	at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
	at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at java.base/sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:440)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:242)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:121)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:73)
	at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:614)
	at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:612)
	at java.base/java.lang.reflect.Executable.getAnnotation(Executable.java:582)
	at java.base/java.lang.reflect.Method.getAnnotation(Method.java:696)
	at <<<guice>>>
	at org.elasticsearch.node.Node.<init>(Node.java:605)
	at org.elasticsearch.node.Node.<init>(Node.java:266)
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333)
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	<<<truncated>>>

2019.09.17 16:27:33 WARN  es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) An exception was caught and reported. Message: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
  at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:142)

1 error
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.0.jar:6.8.0]
	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.0.jar:6.8.0]
Caused by: org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) An exception was caught and reported. Message: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
  at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:142)

1 error
	at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:361) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:136) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:92) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:96) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:42) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.node.Node.<init>(Node.java:605) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.0.jar:6.8.0]
	... 6 more
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:?]
	at java.security.AccessController.checkPermission(AccessController.java:1036) ~[?:?]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:408) ~[?:?]
	at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1324) ~[?:?]
	at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:174) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:416) ~[?:?]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[?:?]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[?:?]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[?:?]
	at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:440) ~[?:?]
	at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:242) ~[?:?]
	at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:121) ~[?:?]
	at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:73) ~[?:?]
	at java.lang.reflect.Executable.declaredAnnotations(Executable.java:614) ~[?:?]
	at java.lang.reflect.Executable.declaredAnnotations(Executable.java:612) ~[?:?]
	at java.lang.reflect.Executable.getAnnotation(Executable.java:582) ~[?:?]
	at java.lang.reflect.Method.getAnnotation(Method.java:696) ~[?:?]
	at org.elasticsearch.common.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:87) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:78) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:221) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:233) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:96) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:142) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:89) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:96) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:42) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.node.Node.<init>(Node.java:605) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.0.jar:6.8.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.0.jar:6.8.0]
	... 6 more

Hi,

What version of Java are you running SonarQube with?

 
Ann

I installed the latest which I believe is 13. I had initially installed 8 but I got an error that it had to be 11+.

Hi,

That’s an inaccuracy in our docs which ought to be fixed by the next release. We don’t actually support above 11. Can you downgrade Java & try again, please?

 
Ann

P.S. Welcome to the community! :slightly_smiling_face:

1 Like

Had the same problem, I was using OpenSDK 13. Downgrading to OpenSDK 11 did the trick. I could get SonarQube Comminity 7.9.1 up and running.

Thanks for the information.

3 Likes

I had the same trouble with SonarQube with Win10 x64 I downgrade the java version to 11.05 (LTS) and everything is OK !!

Java 11.05 download link

1 Like