[ERROR] 05:29:08.746 SonarQube server [http://localhost:9000] can not be reached
-
- I am using sonar 10.4.1 and plugin I am using Sonar scanner for jenkins.
-
- I want to integrate sonar with jenkins.
-
- My jenkins is installed in ubuntu server, and Sonar is running in windows, through cli, using StartSonar.bat command.
-
- I am using jenkins with http://ubuntuJenkins_ip:8080 and sonar with http://windows_ip:9000.
-
- Now When i am trying to run a pipeline in jenkins using following script:
sh āmvn clean packageā
sh āāā mvn sonar:sonar -Dsonar.url=http://windows_ip:9000
-Dsonar.login=Sonar_token
-Dsonar.projectKey=SonarSAST
-Dsonar.java.binaries=.
-Dsonar.projectName=SonarSAST
āāā
I am getting error :
- Now When i am trying to run a pipeline in jenkins using following script:
[INFO] 05:29:08.707 User cache: /var/lib/jenkins/.sonar/cache
[ERROR] 05:29:08.746 SonarQube server [http://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
I have gone through many solution given online,
- checked my fireawall,
- checked my network
- checked jenkins configuration
- checked Sonarqube configuration
- used http://windows_ip:9000
- used http://localhost:9000
- Set up webhook in Sonar http://ubuntuJenkins_ip:8080/sonarqube-webhook, etc, etc.
still I am not able to solve this issue,
earlier i have resolved this issue, but after i have reinstalled everything. I am stuck in this issue again. Please help on this issueā¦!!