无法到达http:// localhost:9000的声纳跑步者

时间:2015-10-07 10:59:40

标签: sonarqube sonar-runner

成功安装sonarqube和声纳跑步者后,我正面临这个问题。 当我在project / sonar-runner中运行时,它显示错误。 有人可以帮忙吗?

ERROR: Sonar server 'http://localhost:9000' can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.109s
Final Memory: 0M/87M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.kevinsawicki.HttpRequest$HttpRequestException: java.net.ConnectException: Connection refused at org.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1392)
at org.sonar.runner.kevinsawicki.HttpRequest.ok(HttpRequest.java:1417)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:93) at org.sonar.runner.impl.ServerVersion.downloadVersion(ServerVersion.java:47)
at org.sonar.runner.impl.ServerVersion.version(ServerVersion.java:38)
at org.sonar.runner.impl.ServerVersion.is37Compatible(ServerVersion.java:58)
at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:36) at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:71) at java.security.AccessController.doPrivileged(Native Method) at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100) at org.sonar.runner.Main.executeTask(Main.java:70)  at org.sonar.runner.Main.execute(Main.java:59)  at org.sonar.runner.Main.main(Main.java:53) Caused by: java.net.ConnectException: Connection refused
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:534) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1548) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1544) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1542) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1193) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:397) at org.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1390) ... 15 more

下面提到的声纳日志是:

    --> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

WrapperSimpleApp: Unable to locate the class org.sonar.application.App: java.lang.UnsupportedClassVersionError: org/sonar/application/App : Unsupported major.minor version 51.0

WrapperSimpleApp Usage:
  java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]

Where:
  app_class:      The fully qualified class name of the application to run.
  app_arguments:  The arguments that would normally be passed to the
                  application.

2 个答案:

答案 0 :(得分:0)

就我而言,我已经取代了sonar.host.url = http://10.xxx.XX.30:9000

答案 1 :(得分:0)

当您尝试将使用较高Java版本创建的程序类文件运行到较低Java版本时,会发生 java.lang.UnsupportedClassVersionError 问题。要解决此问题,请按以下步骤操作:

  1. 转至/opt/sonar/sonarqube-6.7.3/conf
  2. 在wrapper.conf文件中编辑以下行并重新启动声纳。 wrapper.java.command=/My/jdk_home/bin/java