Sporadically the SonarQube server can not be reached

4,367 views
Skip to first unread message

markus....@de.bosch.com

unread,
Jul 28, 2016, 6:04:20 AM7/28/16
to SonarQube
The SonarQube server is running on a Linux machine.
The analysis is triggered by a Jenkins job.
In about 50 % of the runs I get the error message below.
The problem occus since I upgraded SonarQube from V5.1 to V5.6.
The Jenkins version is 1.514. The Jenkins Sonar plugin version is 2.1.
Has somebody an idea what can trigger the sporadic problem?


[DEBUG] Get bootstrap index...
[DEBUG] Download: http://abtv7522:9000/batch_bootstrap/index
[ERROR] SonarQube server [http://abtv7522:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] com.bosch.sharcc.cdevelopment.parent .............. FAILURE [1.071s]
[INFO] com.bosch.sharcc.cdt .............................. SKIPPED
[INFO] com.bosch.sharcc.cdevelopment ..................... SKIPPED
[INFO] com.bosch.sharcc.cdt.tests ........................ SKIPPED
[INFO] com.bosch.sharcc.cdevelopment.updatesite .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.867s
[INFO] Finished at: Wed Jul 27 19:48:01 CEST 2016
[INFO] Final Memory: 87M/747M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project com.bosch.sharcc.cdevelopment.parent: Unable to execute SonarQube: Fail to download libraries from server: Status returned by url [http://abtv7522:9000/batch_bootstrap/index] is not valid: [407] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project com.bosch.sharcc.cdevelopment.parent: Unable to execute SonarQube
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute SonarQube
	at org.sonarsource.scanner.maven.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:36)
	at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:81)
	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:112)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
	at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:60)
	... 22 more
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
	at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
	at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
	at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
	... 29 more
Caused by: java.lang.IllegalStateException: Status returned by url [http://abtv7522:9000/batch_bootstrap/index] is not valid: [407]
	at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:116)
	at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
	at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78)
	... 32 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Notifying upstream projects of job completion
Finished: FAILURE

nicolas...@sonarsource.com

unread,
Jul 29, 2016, 3:12:32 AM7/29/16
to SonarQube, markus....@de.bosch.com
Hi,

Logs show that the scanner receives an HTTP 407 code, which means Proxy Authentication Required . So it looks like some of your Jenkins builders try to contact your SonarQube through a proxy, hence the sporadic issue. (FYI SonarQube scanners currently do not support contacting the SonarQube server through a proxy.)

All in all nothing tightly related to SonarQube in your error, you need to look into your network infra/settings and find out why requests are sometimes going through authenticated proxy.

Best regards,
Nicolas
Reply all
Reply to author
Forward
0 new messages