Pipeline is failed: Unable to connect to server. Please check if the server is running and if the address is correct. Url: '$SONAR_HOST_URL/api/server/version'. An error occured while querying the server version! Please check if the server is running and if the address is correct.
3.I have two questions about a sonarscanner installation:
Why is it that every time I see the message ``The tools directory ‘/root/.dotnet/tools’ is not currently in the PATH environment variable.'`?
Where is the sonarscanner installed if the pipeline is running in the Bitbucket cloud?
Everything looks in order here. Can you make sure you haven’t set SONAR_HOST_URL as being Secured? SONAR_TOKEN needs to be set that way, but not SONAR_HOST_URL. If this changes the error message, post an updated version.
I guess you would avoid that message if you switched these two commands
But you end up with the same result.
It might be interesting feedback for our analysis tutorial folks that this could kill some noise. I’ll pass it on.
But to be honest, I don’t know what to do about it because I don’t know where SonarScanner is running from (in case it is being used from the Bitbucket cloud pipeline).
The SonarScanner is running in Bitbucket Pipelines, probably on a hosted agent (hosted by Bitbucket) that doesn’t have access to your internal network or machine.
What this usually means is that you need a SonarQube server accessible over the public internet, or at least by the Bitbucket runners