sonarqube - 在本地运行 Sonar 运行器失败

标签 sonarqube sonar-runner

我在本地机器上的 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_PATHGEM_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/

相关文章:

java - Sonar 引用插件小部件未在仪表板中显示

java - 了解 sonarqube 中的缠结指数

java - 推荐的规则集

java - SonarQube 无法识别某些 Lombok 注释 - Jacoco 的误导性测试覆盖率结果

sonarqube - 将分析上传到 SonarQube 时出错

database - Sonar 数据库

java - Sonar 管 : "Project configuration file: NONE "

delphi - 使用 Ant 配置 Sonar 模块的 build.xml 文件

java - 在 SonarQube 中使用枚举错误计算开关条件

sonarqube - 自 SonarQube 5.2 起,批处理端不再支持任务