SonarQube server [$SONAR_HOST_URL] can not be reached

Sandeep.Dash March 14, 2022

Hi,

When I am trrying to sonar scan project through bitbucket pipeline. I am getting building error: SonarQube server [$SONAR_HOST_URL] can not be reached. Please provide solution 

1 answer

0 votes
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022

Hi Sandeep,

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

To resolve this issue, can I ask you to Create a custom environment variable with SONAR_HOST_URL as the Name and your SonarQube server URL as the Value. You can create a variable by following the steps here

Source: https://docs.sonarqube.org/latest/analysis/bitbucket-cloud-integration/

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Sandeep.Dash March 16, 2022

Hi, Nobert,

This is a dedicated sonar-cube server hosted on one of the datacenter. We can only access it through a URL within our company network using a username and password.

This cannot be accessed outside of company network.

I tried to update my bitbucket-pipelines.yml file so that when i push the code from local repo to remote, the pipeline would be triggered, automation code would run and then quality gate result would be displayed in sonarcube. I am getting the above error: URL couldn't be reached. Attaching the pipeline yml file and screenshot of the page on sonarcube where it asks to follow some steps to configure. I would appreciate your help on this.

FYI i did create a custom env variable and then passed it on yml file

yml file.jpg

 

ymlfile1.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events