【问题标题】:SonarQube: Fail to get bootstrap index from server: Status returned by url [http://localhost:9000/batch/index] is not valid: [404]SonarQube:无法从服务器获取引导索引:url [http://localhost:9000/batch/index] 返回的状态无效:[404]
【发布时间】:2017-10-18 10:34:39
【问题描述】:

我是 sonarqube 的新手,正在尝试用它分析一个 maven 项目。我正在使用以下命令开始分析

mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=TOKEN_GENERATED

但我收到 404 错误

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building crystalviz 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ crystalviz ---
[INFO] User cache: /Users/gkumar6/.sonar/cache
[ERROR] SonarQube server [http://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.184 s
[INFO] Finished at: 2017-10-18T16:00:59+05:30
[INFO] Final Memory: 25M/437M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project crystalviz: Unable to execute SonarQube: Fail to get bootstrap index from server: Status returned by url [http://localhost:9000/batch/index] is not valid: [404] -> [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,maven 也无法访问它。

请帮我解决这个问题。提前致谢。

【问题讨论】:

  • 使用 sonarqube-5.6.7 后问题得到解决
  • 当您在浏览器中转到localhost:9000 时,您是否看到 SonarQube 的仪表板?

标签: java maven sonarqube


【解决方案1】:

SonarQube 6.5 版本更新。这是固定的。

【讨论】:

    【解决方案2】:

    SonarQube 是否为您在本地运行?如果没有,则在终端 (Mac) 中键入以下命令:

    sonar console
    brew services start sonarqube 
    

    【讨论】:

      猜你喜欢
      • 2017-12-19
      • 2017-03-16
      • 2019-08-09
      • 2020-08-23
      • 2018-10-14
      • 2015-01-15
      • 1970-01-01
      • 1970-01-01
      • 2015-11-12
      相关资源
      最近更新 更多