我試圖從jenkins job執行以下maven命令, mvn clean install sonar:sonar -Dsonar.host.url=http://hostname:9095/sonar -Dsonar.projectKey=mavensample -Dsonar.login=admin -Dsonar.password=admin -X
SonarQube:無法從服務器獲得引導程序索引:URL [http:// hostname:9095/sonar/batch/index]返回的狀態無效:[403]
但它失敗,以下錯誤,
[DEBUG] 18:20:49.119 Download: http://hostname:9095/batch/index
[ERROR] 18:20:49.176 SonarQube server [http://hostname:9095] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.920 s
[INFO] Finished at: 2017-07-14T18:20:49+02:00
[INFO] Final Memory: 20M/171M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project my-stc: Unable to execute SonarQube: Fail to get bootstrap index from server: Status returned by url [http://hostname:9095/batch/index] is not valid: [403] -> [Help 1]
當我試圖訪問瀏覽器,它的工作原理http://hostname:9095。
我也設置了sonarqube設置中的基址爲http://hostname:9095並嘗試過,但是它失敗的時候出現了同樣的錯誤。
Sonaqube與maven和jenkins安裝在同一臺機器上。
我認爲這可能是由於代理(可能是我錯了),所以我已經在sonar.properties文件中設置代理設置,並嘗試但沒有運氣。
僅供參考,它是採用以下聲納Maven插件的版本,
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ my-stc ---
任何人都面臨着同樣的問題早?
由於詹金斯和SonarQube在同一臺機器上,也許你可以嘗試'http:// localhost:9095' – janos
沒有運氣。同樣的錯誤,'[DEBUG] 09:37:25.105下載:http:// localhost:9095/batch/index [錯誤] 09:37:25.264 SonarQube服務器[http:// localhost:9095]無法到達' –