ERROR: SonarQube server [http://52.90.29.29:9000] can not be reached

1,332 views
Skip to first unread message

samb...@gmail.com

unread,
May 15, 2018, 4:55:31 PM5/15/18
to SonarQube
I have installed Jenins and SonarQube on same Redhat machine. SonarQube is ruuning and able to acces by using http://52.90.29.29:9000.
But when I ran the job from jenkins it says SonarQube server is not reaching. Any solution for this issue?

[Sonar-Java] $ /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube/bin/sonar-scanner -X -X -Dsonar.host.url=http://52.90.29.29:9000 ******** -Dsonar.projectName=sonar -Dsonar.projectVersion=1.0 -Dsonar.web.port=9000 -Dsonar.projectKey=sonar -Dsonar.web.host=52.90.29.29 -Dsonar.java.source=1.8 -Dsonar.java.binaries=/var/lib/jenkins/workspace/Sonar-Java/JunitTesting/target/classes -Dsonar.sources=/var/lib/jenkins/workspace/Sonar-Java/JunitTesting/src/main/java -Dsonar.projectBaseDir=/var/lib/jenkins/workspace/Sonar-Java
channel stopped
20:44:20.866 INFO: Scanner configuration file: /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube/conf/sonar-scanner.properties
20:44:20.869 INFO: Project root configuration file: NONE
20:44:20.909 INFO: SonarQube Scanner 3.1.0.1141
20:44:20.909 INFO: Java 1.8.0_171 Oracle Corporation (64-bit)
20:44:20.909 INFO: Linux 3.10.0-862.el7.x86_64 amd64
20:44:21.121 DEBUG: keyStore is : 
20:44:21.121 DEBUG: keyStore type is : jks
20:44:21.121 DEBUG: keyStore provider is : 
20:44:21.121 DEBUG: init keystore
20:44:21.121 DEBUG: init keymanager of type SunX509
20:44:21.308 DEBUG: Create: /var/lib/jenkins/.sonar/cache
20:44:21.309 INFO: User cache: /var/lib/jenkins/.sonar/cache
20:44:21.309 DEBUG: Create: /var/lib/jenkins/.sonar/cache/_tmp
20:44:21.319 DEBUG: Extract sonar-scanner-api-batch in temp...
20:44:21.330 DEBUG: Get bootstrap index...
20:44:21.330 DEBUG: Download: http://52.90.29.29:9000/batch/index
20:44:26.380 ERROR: SonarQube server [http://52.90.29.29:9000] can not be reached
20:44:26.380 INFO: ------------------------------------------------------------------------
20:44:26.380 INFO: EXECUTION FAILURE
20:44:26.380 INFO: ------------------------------------------------------------------------
20:44:26.381 INFO: Total time: 5.530s
20:44:26.409 INFO: Final Memory: 4M/119M
20:44:26.409 INFO: ------------------------------------------------------------------------
20:44:26.409 ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:167)
	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:113)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
	at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
	at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
	... 7 more
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.platform.Platform.connectSocket(Platform.java:124)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:223)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:149)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:195)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:69)
	at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:113)
	at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:98)
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
	... 10 more
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

nicolas...@sonarsource.com

unread,
May 16, 2018, 3:35:53 AM5/16/18
to SonarQube
Hi there,

Well the first to check here would be to manually verify if you can connect to SonarQube from that same Jenkins slave: log in the Jenkins slave, use curl or wget to connect to the SonarQube , see how it goes. That will let you determine whether there's a specific connectivity gotcha from your Jenkins environment.

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