2015-11-27 34 views
-1

每一次通过控制台或詹金斯进行运行抛出我下面的错误:Sonar - 无法请求服务器版本| HTTP状态404/

SonarQube Runner 2.4 
Java 1.8.0_51 Oracle Corporation (32-bit) 
Linux 2.6.32-504.30.3.el6.i686 i386 
INFO: Runner configuration file: /usr/local/sonar-runner/conf/sonar-runner.properties 
INFO: Project configuration file: /opt/apps/php-sonar-runner/sonar-project.properties 
INFO: Default locale: "es_ES", source code encoding: "UTF-8" 
INFO: Work directory: /opt/apps/php-sonar-runner/./.sonar 
INFO: EXECUTION FAILURE 
INFO: ------------------------------------------------------------------------ 
Total time: 0.042s 
Final Memory: 0M/28M 
INFO: ------------------------------------------------------------------------ 
ERROR: Error during Sonar runner execution 
ERROR: Fail to request server version 
ERROR: Caused by: Status returned by url : 'http://xxx.xxx.xx.xxx:9000/api/server/version' is invalid : 404 
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch. 
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging. 
+0

你的问题是在这里交叉检查? – SnareChops

+0

相同的问题已经在这里得到解答http://stackoverflow.com/questions/24889962/sonar-fail-to-request-server-version-http-status-404 –

回答

0

在你sonar-runner.properties文件

定义#---默认SonarQube断绝如在下面

sonar.host.url=http://localhost:9000/sonar 

另外在sonar.properties文件即

sonar.web.port=9000 
sonar.web.host=127.0.0.1 
sonar.web.context=/sonar