我正在从构建系统运行SonarScanner.MSBuild.exe v4.2
来构建我的.NET 4.6.1
项目,并且服务器是SonarQube server v6.7
。这两个系统都位于Windows Server 2012
上,并且它们之间具有安全连接。
两个系统之间的连接很好,我可以从扫描仪机器浏览uri https://mysonarqubeserver.com/batch/index
,而不会出现任何问题。
当我在构建计算机上使用NAnt
脚本运行扫描仪时,begin
步骤可以正常工作。但是它总是在SonarQube-end
步骤失败,表明连接超时!下面是错误消息
无法从服务器获取引导索引
控制台日志如下。谁能解决这个问题? (从本地开发机运行时,整个设置工作正常)
[exec] 22:35:05.546 INFO: SonarQube Scanner 3.1.0.1141
[exec] 22:35:05.562 INFO: Java 1.8.0_102 Oracle Corporation (64-bit)
[exec] 22:35:05.562 INFO: Windows Server 2012 R2 6.3 amd64
[exec] 22:35:05.562 INFO: SONAR_SCANNER_OPTS=-Xmx1024m
[exec] 22:35:06.531 DEBUG: keyStore is :
[exec] 22:35:06.531 DEBUG: keyStore type is : jks
[exec] 22:35:06.531 DEBUG: keyStore provider is :
[exec] 22:35:06.531 DEBUG: init keystore
[exec] 22:35:06.531 DEBUG: init keymanager of type SunX509
[exec] 22:35:06.906 DEBUG: Create: C:\Users\xxxx\.sonar\cache
[exec] 22:35:07.000 INFO: User cache: C:\Users\xxxx\.sonar\cache
[exec] 22:35:07.000 DEBUG: Create: C:\Users\xxxx\.sonar\cache\_tmp
[exec] 22:35:07.000 DEBUG: Extract sonar-scanner-api-batch in temp...
[exec] 22:35:07.249 DEBUG: Get bootstrap index...
[exec] 22:35:07.249 DEBUG: Download: https://mysonarqubeserver.com/batch/index
[exec] 22:35:12.578 INFO: ------------------------------------------------------------------------
[exec] 22:35:12.578 INFO: EXECUTION FAILURE
[exec] 22:35:12.578 INFO: ------------------------------------------------------------------------
[exec] 22:35:12.578 INFO: Total time: 7.735s
[exec] 22:35:12.578 ERROR: SonarQube server [https://mysonarqubeserver.com] can not be reached
[exec] 22:35:12.593 INFO: Final Memory: 5M/245M
[exec] 22:35:12.593 INFO: ------------------------------------------------------------------------
[exec] 22:35:12.593 ERROR: Error during SonarQube Scanner execution
[exec] 22:35:12.593 ERROR: Unable to execute SonarQube
[exec] 22:35:12.593 ERROR: Caused by: Fail to get bootstrap index from server
[exec] 22:35:12.593 ERROR: Caused by: connect timed out
[exec] 22:35:12.593 ERROR:
[exec] 22:35:12.593 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
[exec] Process returned exit code 1
[exec] The SonarQube Scanner did not complete successfully