我在本地机器上的 localhost:9000 上运行了一个 Sonar 实例,我可以访问并使用控制台。当我尝试从项目的命令行运行 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>
我不知道从这里去哪里。有什么建议吗?
最佳答案
当前的解决方法是取消设置 GEM_PATH
和 GEM_HOME
启动 Sonar 网络服务之前的变量:
unset GEM_PATH GEM_HOME
./sonar.sh console
对于 Sonar 运行环境,不必执行此操作。
问题是由 conflict with Ruby local installation 引起的.
关于sonarqube - 在本地运行 Sonar 运行器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19231613/