I’m using SonarLint for Eclipse version 3.6.0.201806071228 during the adding new SonarQube Servers there is an error message as
Fail to request https://myhost/sonar/api/system/status
I also have a chance to look at Eclipse log from .metadata/.log and found some exceptions as the following: -
java.lang.IllegalStateException: Fail to request https://myhost/sonar/api/system/status
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.doCall(HttpConnector.java:195)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.get(HttpConnector.java:121)
...
Caused by: javax.net.ssl.SSLPeerUnverifiedException: Hostname myhost not verified:
certificate: sha256/PodNMADG18N4nZRIKTVuyWJeptKpt3kuf0ki764t4Ag=
DN: EMAILADDRESS=..., CN=myhost , OU=..., O=..., L=..., ST=..., C=...
subjectAltNames: []
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:316)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:270)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:162)
I can confirm that the myhost at the URL is the same as at the certificate CN.
This server, myhost, servers the https for several services including with Artifactory, GitLab and especially the SonarQube. Both Artifactory and GitLab is able to be connected via the M2E and EGit via the https properly, except the SonarLint.
Furthermore I am able to execute the mvn sonar:sonar to perform an analysis against the SonarQube via https, too.
Please note, that certificate is signed by my own root certificate which is generated by OpenSSL. I also inject that root certificate to my JDK/jre/lib/security/cacerts. The Eclipse and my workspace also point to the same JDK location.
Could you please help to advise how to solve this issue?