ERROR: SonarQube server [XXXXX] can not be reached when tryign to integrate jenkins with sonarqube

  • Using SonarQube Data Center Edition Version 7.7
  • Trying to integrate jenkins with SonarQube.

When trying to integrate jenkins version 2.32.1 with sonarqube Data Center Edition Version 7.7 ,I am getting below error:

**12:09:08** INFO: User cache: /home/jenkins/.sonar/cache 
**12:09:13** ERROR: SonarQube server [[xxxxxxxxx/)] can not be reached 
**12:09:13** INFO: ------------------------------------------------------------------------ 
**12:09:13** INFO: EXECUTION FAILURE 
**12:09:13** INFO: ------------------------------------------------------------------------ 
**12:09:13** INFO: Total time: 5.461s 
**12:09:13** INFO: Final Memory: 4M/224M 
**12:09:13** INFO: ------------------------------------------------------------------------ 
**12:09:13** ERROR: Error during SonarQube Scanner execution 
**12:09:13** org.sonar.runner.impl.RunnerException: Unable to execute SonarQube 
**12:09:13**    at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100) 
**12:09:13**    at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87) 
**12:09:13**    at java.security.AccessController.doPrivileged(Native Method) 
**12:09:13**    at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87) 
**12:09:13**    at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83) 
**12:09:13**    at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:249) 
**12:09:13**    at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:187) 
**12:09:13**    at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:182) 
**12:09:13**    at org.sonarsource.scanner.cli.Main.execute(Main.java:76) 
**12:09:13**    at org.sonarsource.scanner.cli.Main.main(Main.java:66) 
**12:09:13** Caused by: java.lang.IllegalStateException: Fail to download libraries from server 
**12:09:13**    at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:93) 
**12:09:13**    at org.sonar.runner.impl.Jars.download(Jars.java:70) 
**12:09:13**    at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40) 
**12:09:13**    at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91) 
**12:09:13** ... 9 more 
**12:09:13** Caused by: java.net.SocketTimeoutException: connect timed out 
**12:09:13**    at java.net.PlainSocketImpl.socketConnect(Native Method) 
**12:09:13**    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 
**12:09:13**    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 
**12:09:13**    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 
**12:09:13**    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
**12:09:13**    at java.net.Socket.connect(Socket.java:589) 
**12:09:13**    at org.sonar.runner.okhttp.internal.Platform.connectSocket(Platform.java:101) 
**12:09:13**    at org.sonar.runner.okhttp.Connection.connectSocket(Connection.java:198) 
**12:09:13**    at org.sonar.runner.okhttp.Connection.connect(Connection.java:172) 
**12:09:13**    at org.sonar.runner.okhttp.Connection.connectAndSetOwner(Connection.java:358) 
**12:09:13**    at org.sonar.runner.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:117) 
**12:09:13**    at org.sonar.runner.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329) 
**12:09:13**    at org.sonar.runner.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246) 
**12:09:13**    at org.sonar.runner.okhttp.Call.getResponse(Call.java:276) 
**12:09:13**    at org.sonar.runner.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:234) 
**12:09:13**    at org.sonar.runner.okhttp.Call.getResponseWithInterceptorChain(Call.java:196) 
**12:09:13**    at org.sonar.runner.okhttp.Call.execute(Call.java:79) 
**12:09:13**    at org.sonar.runner.impl.ServerConnection.callUrl(ServerConnection.java:184) 
**12:09:13**    at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:121) 
**12:09:13**    at org.sonar.runner.impl.ServerConnection.tryServerFirst(ServerConnection.java:148) 
**12:09:13**    at org.sonar.runner.impl.ServerConnection.download(ServerConnection.java:112) 
**12:09:13**    at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:78) 
**12:09:13** ... 12 more

Hello,
Are you able to ping one of your your App servers (or load balancer) from the analysis server ?
If yes, are you able to telnet those servers or the load balancer from the analysis server ?
Alex.

1 Like

Thanks Alexandre on writing back!!
On further analysis,found that the issue was primarily around firewall restriction which got fixed now.