SonarQube server could not be reached

I have installed Jenkins and SonarQube 5.1.1 (also tried LTS), it is running on Ubuntu server and available externally. I installed Jenkins SonarQube plugin and everything almost works. If I set the SonarQube server url in Jenkins to localhost then everything works fine. But then the link to SonarQube (inside Jenkins) will point to localhost and that's not ok when I access Jenkins from outside.

If I set the server url for my real IP, for example 111.112.113.114, then I get an error saying that the server cannot be reached.

[ERROR] Failed to execute target org.codehaus.mojo: sonar-maven-plugin: 2.6: sonar (default-cli) in project com.ericsson.dx.lta.parent: Execute default-cli target org. codehaus.mojo: sonar-maven-plugin: 2.6: Sonar job failed: SonarQube server cannot be reached at http://111.112.113.114:9000/sonar . Check the "sonar.host.url" parameter. Timeout -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute target org.codehaus.mojo: sonar-maven-plugin: 2.6: sonar (default-cli) in project com.ericsson.dx.lta .parent: Executing default-cli target org.codehaus.mojo: sonar-maven-plugin: 2.6: sonar failure: SonarQube server cannot be reached at http://111.112.113.114:9000/sonar . Check the "sonar.host.url" parameter.

But I have no problem accessing SonarQube in a browser from another computer.

In sonar.properties I tried with different settings on sonar.web.host like sonar.web.host = 0.0.0.0 and sonar.web.host = 111.112.113.114

+3


source to share


1 answer


If I understand your problem correctly, I think what you are looking for is a property sonar.core.serverBaseUrl

that you can set in the global admin settings:

enter image description here



This is the "public" URL for your SonarQube instance to be used in logs or notifications.

+2


source







All Articles