首页 > 解决方案 > 连接被拒绝:无法访问 SonarQube 服务器

问题描述

请参阅我的设置的屏幕截图

在此处输入图像描述

我已经在 jenkins 中配置了 SonarQube,在构建项目时它会抛出以下错误。

[codeAnalysisSonar] $ "C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Sonar_Scanner\bin\sonar-scanner.bat" -e -Dsonar.host.url=http://192.168.0.99:9000/sonar -Dsonar.projectName=app-Dsonar.projectkey=uk.org.app.hfi -Dsonar.sources="./" "-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\workspace\codeAnalysisSonar"
INFO: Option -e/--errors is no longer supported and will be ignored
INFO: Scanner configuration file: C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Sonar_Scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_171 Oracle Corporation (64-bit)
INFO: Windows Server 2008 R2 6.1 amd64
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
ERROR: SonarQube server [http://192.168.0.99:9000/sonar] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.028s
INFO: Final Memory: 4M/123M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to execute SonarQube
ERROR: Caused by: Fail to get bootstrap index from server
ERROR: Caused by: Failed to connect to /192.168.0.99:9000
ERROR: Caused by: Connection refused: connect
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILUR

标签: androidjenkinssonarqube

解决方案


推荐阅读