Ashokekumar S
Ashokekumar S

Reputation: 361

SONAR SCANNER not running - unable to connect to sonarqube server

I'm able to access sonarqube server from my build agent browser - it loads fine. Im able to telnet to my sonarqube server from the same build agent and telnet works fine. I'm able to hit a CURL to my sonarqube api (api/authentication/validate) and i get a valid=true response.

When in invoke my sonar-scanner i get SONARQUBE SERVER CANNOT BE REACHED ERROR. I have given "Anyone" user execute analysis permission in my SONAR server. I have only my sonar server url given in sonar scanner. I copied my sonar scanner and the same project to another build VM and im able to build fine.

not sure what im missing here, please help

Upvotes: 0

Views: 4484

Answers (1)

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22794

Your error is "server cannot be reached", so this doesn't have anything to do with permissions to execute an analysis.

At a guess, your global scanner configuration doesn't point correctly to your SonarQube instance. You can override that at the analysis level using -Dsonar.host.url=[your URL here] or you can find and fix the global config. I'd tell you what to look for, but you don't say which scanner you're using.

Upvotes: 1

Related Questions