我正在尝试安装SonarQube Runner。
我正在使用这个版本:
我已配置:
并在我的项目目录中创建了要分析的项目配置文件:
SonarQube运行正常,我可以证实:
service sonar status
如果我跑:
sonar-runner -X
我收到以下错误:
SonarQube Runner 2.4
Java 1.7.0_79 Oracle Corporation (32-bit)
Linux 2.6.38-8-generic i386
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /opt/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /home/taller/taller2016/U3D_2016/sonar-project.properties
INFO: Default locale: "es_AR", source code encoding: "UTF-8"
INFO: Work directory: /home/taller/taller2016/U3D_2016/./.sonar
INFO: SonarQube Server 5.1
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.185s
Final Memory: 0M/53M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:78)
at org.sonar.runner.impl.Jars.download(Jars.java:57)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:46)
at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:37)
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.io.IOException: Status returned by url : 'http://localhost:9002/sonar/batch_bootstrap/index' is invalid : 404
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:94)
at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:64)
... 12 more
我需要做什么或改变才能解决它?
access.log包含:
127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/api/server/version HTTP/1.1" 200 3 "-" "SonarQubeRunner/2.4"
127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/batch_bootstrap/index HTTP/1.1" 302 109 "-" "SonarQubeRunner/2.4"
127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/api/maintenance HTTP/1.1" 404 1045 "-" "SonarQubeRunner/2.4"
谢谢!
答案 0 :(得分:1)
我发现在服务器上运行的Java版本是6,而这个SonarQube需要Java 7.所以,我升级了java版本。然后继续给出其他错误,但丢弃数据库并重新生成它,它正常工作。