SonarQube Server Authentication failing (on SSL-connection)

(Johannes Becker) #1


I just installed the new Eclipse Photon along with SonarLint ( and opened my existing workspace. Now SonarQube Server Authentication is suddenly failing.

Exception Stack Trace

java.lang.IllegalStateException: Fail to request https://sonar:9443/api/system/status
	at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(
	at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(
	at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(
	at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(
	at org.sonarsource.sonarlint.core.container.connected.update.perform.GlobalStorageUpdateExecutor.update(
	at org.sonarsource.sonarlint.core.container.connected.ConnectedContainer.update(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$null$1(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.runInConnectedContainer(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$update$2(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withRwLock(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.update(
	at org.sonarlint.eclipse.core.internal.server.Server.updateStorage(
Caused by: Failed to connect to sonar/
	at okhttp3.internal.connection.RealConnection.connectSocket(
	at okhttp3.internal.connection.RealConnection.connect(
	at okhttp3.internal.connection.StreamAllocation.findConnection(
	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(
	at okhttp3.internal.connection.StreamAllocation.newStream(
	at okhttp3.internal.connection.ConnectInterceptor.intercept(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.internal.cache.CacheInterceptor.intercept(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.internal.http.BridgeInterceptor.intercept(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.internal.http.RealInterceptorChain.proceed(
	at okhttp3.RealCall.getResponseWithInterceptorChain(
	at okhttp3.RealCall.execute(
	... 16 more
Caused by: Connection refused: connect
	at java.base/ Method)
	at java.base/
	at java.base/
	at java.base/
	at java.base/
	at java.base/
	at java.base/
	at java.base/
	at okhttp3.internal.platform.Platform.connectSocket(
	at okhttp3.internal.connection.RealConnection.connectSocket(
	... 34 more

Session Data:

    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
    Framework arguments:  -product org.eclipse.epp.package.jee.product
    Command-line arguments:  -data file:/C:/dev/xxx/ -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

I can access the https://sonar:9443/api/system/status page via browser. Anybody else experiencing this?


(Adam Gabryś) #2

Is your SSL certificate trused and valid (not expired, hostname equal to sonar etc)?

I know that the stacktrace is different from those topics, but maybe the cause is the same:

(Johannes Becker) #3

Thanks a million, this was a useful hint. I forgot to add the certs on Eclipse startup. In my case, startup Eclipse
eclipse.exe -vmargs
did the trick.

A more intuitive stacktrace would have been handy here.

(Abhishek Chanda) #4

I am having the same issue. SonarLint cannot connect to SonarQube because “Fail to request …/api/system/status”

First of all, where do I see the logs for this?

Secondly, I imported the certificate into keystore and included that in the eclipse. Still having the same issue. Please help

(Adam Gabryś) #5

In Eclipse you can find logs on Console tab:

(Abhishek Chanda) #6

Problem is nothing is getting logged in the console. As you can see from my screen grab, the error is there while connecting to SonarQube but there is no log. I have imported the certifcates in a new keystore and using that keystore in eclipse.ini. Can’t figure out where is the problem

(Julien Henry) #7

Can you also look at Eclipse “Error log” view? Sometimes the stacktrace go there.

(Abhishek Chanda) #8

there is no error log related to this issue in any console/view

(Julien Henry) #9

In the Sonarlint console, can you ensure verbose output is enabled?

(Abhishek Chanda) #10

Thanks for the tip. It worked. I can now see the error log.

The hostname and the CN are same. I can access the sonarqube using web browser. Don’t know what is the issue here.

	at org.eclipse.jface.operation.ModalContext$
Caused by: Hostname not verified:
    certificate: sha256/ZebSo6xrjudjbMOhij1+LEakeCng4dRYRoymu4fh1mE=
    DN:,, OU=IT, O=All Companies Inc, L=San Fransisco, ST=California, C=US
    subjectAltNames: []
	at okhttp3.internal.connection.RealConnection.connectTls(
	at okhttp3.internal.connection.RealConnection.establishProtocol(

(Nicolas Bontoux) #11

Can you share the full stacktrace please ? Also make sure to use ``` markers to format your post, and increase readability.

If the stacktrace differs from initial one in this topic then we will forks this in a separate topic, to keep both discussions focused and on topic.