Sonar server could not be reached

I have a problem with my sonarQube plugin in jenkins. When I try to compile my project and run sonarQube then I got the problem:

[INFO] Sonar server can not be reached. Please check the parameter 'sonar.host.url': http://null:9000
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Sonar server can not be reached. Please check the parameter 'sonar.host.url': http://null:9000
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Sonar server can not be reached. Please check the parameter 'sonar.host.url': http://null:9000
    at org.codehaus.mojo.sonar.ServerMetadata.connect(ServerMetadata.java:67)
    at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:85)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    ... 17 more

      

But when I go through my config I see no errors ...

Can someone help me?: /

LEDUNOIS S

PS: I tried to post my config images, but I can't ...

+3


source to share


3 answers


Your hostname is missing.

http: // null: 9000

Instead of null, you must provide the correct hostname



http://mojo.codehaus.org/sonar-maven-plugin/sonar-mojo.html#sonarHostURL

 <profile>
  <id>sonar</id>
  <activation>
  <activeByDefault>true</activeByDefault>
 </activation>
  <properties>
  <sonar.jdbc.url>jdbc:postgresql://localhost/sonar</sonar.jdbc.url>
  <sonar.jdbc.driver>org.postgresql.Driver</sonar.jdbc.driver>
  <sonar.jdbc.username>user</sonar.jdbc.username>
  <sonar.jdbc.password>password</sonar.jdbc.password>
  <!-- SERVER ON A REMOTE HOST -->
  <sonar.host.url>http://localhost:9000</sonar.host.url>
  </properties>
</profile>

      

0


source


I'm not sure if you forgot to install Server URL

from:
Manage Jenkins

Configure System

Sonar installations

Add Sonar

Advanced

Server URL

but I hope this answer helps. enter image description here



0


source


In the conf folder under the sobarqube installation directory, open sonar.properties and comment out the sonar.web.host property if you have defined an explicit value for it. This resolved issue for me.

0


source







All Articles