失败在当地运行声纳 - 跑步者

时间:2013-10-07 18:06:41

标签: sonarqube sonar-runner

我在localhost:9000上运行了我的本地机器上的声纳实例,我可以去使用控制台了。当我尝试从项目的命令行运行sonar-runner时,我收到500错误:

Exception in thread "main" org.sonar.runner.RunnerException: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public void org.sonar.batch.bootstrap.DatabaseCompatibility.start()', instance 'org.sonar.batch.bootstrap.DatabaseCompatibility@3848110b, org.sonar.api.utils.HttpDownloader$HttpException: Fail to download [http://localhost:9000/api/server]. Response code: 500
    at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
    at org.sonar.runner.Runner.execute(Runner.java:151)
    at org.sonar.runner.Main.execute(Main.java:84)
    at org.sonar.runner.Main.main(Main.java:56)
Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public void org.sonar.batch.bootstrap.DatabaseCompatibility.start()', instance 'org.sonar.batch.bootstrap.DatabaseCompatibility@3848110b, org.sonar.api.utils.HttpDownloader$HttpException: Fail to download [http://localhost:9000/api/server]. Response code: 500
    at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(NullComponentMonitor.java:77)
...
...

但是当我在浏览器中访问url时,我得到以下xml响应:

<server>
<id>20131007131041</id>
<version>3.4.1</version>
<status>UP</status>
</server>

我不知道从哪里开始。有什么建议吗?

2 个答案:

答案 0 :(得分:4)

目前的解决方法是在启动声纳网络服务之前取消设置GEM_PATHGEM_HOME变量:

unset GEM_PATH GEM_HOME
./sonar.sh console

对于声纳 - 跑步者环境,不必这样做。

问题是由于conflict with Ruby local installation造成的。

答案 1 :(得分:1)

根据声纳 - 跑步者文档,您需要在项目根目录中创建 %ul.nav.navbar-nav.navbar-right/ %li %a{:href => "http://yoursitelogo.co/"} %img{:alt => "Some site", :height => "50", :src => "/assets/image.png"} ,然后从命令行运行sonar-project.properties

ref Sonar runner docs

就我而言,它适用于以下解决方法

1:sonar-runner

2:export GEM_HOME=''

3:重新启动声纳网络服务器

4:在项目路径中运行export GEM_PATH=''