【问题标题】:Failed to get bootstrap index from server无法从服务器获取引导索引
【发布时间】:2020-02-03 22:43:03
【问题描述】:

我正在尝试对 sonarqube 进行代码分析。但是,我在运行时遇到了错误

mvm 声纳:声纳

这是错误信息:

[ERROR] SonarQube server [http://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.972 s
[INFO] Finished at: 2017-06-06T08:51:52+08:00
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:
3.3.0.603:sonar (default-cli) on project example-java-maven: Unable to execute SonarQube: 
Fail to get bootstrap index from server: Status returned by url 
[http://localhost:9000/batch/index] is not valid: [504] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

但是当我通过浏览器访问http://localhost:9000时,我可以看到sonarqube主页。

那么为什么会发生这种情况呢?

谢谢。

【问题讨论】:

标签: sonarqube


【解决方案1】:

尝试在你的 pom.xml 上使用 sonar-maven-plugin 3.2 版

 <plugin>
      <groupId>org.sonarsource.scanner.maven</groupId>
      <artifactId>sonar-maven-plugin</artifactId>
      <version>3.2</version>
  </plugin>

这对我有用

【讨论】:

  • 声纳站点文档中给出的 3.7.0.1746 版本对我来说抛出了同样的错误,3.2 工作正常。
【解决方案2】:

就我而言,我过去曾在 Maven 的 conf/settings.xml 文件中包含代理设置。删除或注释掉这些公司代理设置解决了这个问题。

【讨论】:

    猜你喜欢
    • 2019-08-09
    • 2020-08-23
    • 1970-01-01
    • 1970-01-01
    • 2017-12-19
    • 1970-01-01
    • 2011-03-23
    • 2011-12-12
    相关资源
    最近更新 更多