Hi there,
Before create this post, I made a research to see if some Tips&Tricks would work out, but, unfortunately, none of the things that I tried worked for me.
When configuring SonarLint via Wizard, I checked the Enable Proxy checkbox and went to proxy settings. There, I made all the configurations required and checked connection to www.google.com. At this point the connection is tested successfully. Then, selecting the SonarQube server, I enter the base path of SonarQube ( https://< hostname >/sonar ). In the next step, I used the Login/Password authentication type, entered my credentials and it ended with a message “Failed to connect to the server. Please check the configuration.”
Things I have already tried:
- Checked with my browser if my https://< hostname >/sonar/api/system/status page is reacheable (and yes, it is working);
- Installed the UnlimitedJCEPolicyJDK8 downloaded from Oracle site;
- Imported my certificate as a Trusted Certificate (using keytool);
- Included -Dsun.security.ssl.allowUnsafeRenegotiation=true in the JVM start configuration;
- Used Token instead of Login/Password connection (and ended in the same error);
- Used my https://< hostname >/sonar/ and https://< hostname >/sonar/api/system/status as Check Connection URLs (in the proxy configuration) and both returned OK (proving that my IDE is reaching desired page);
- Another piece of information: when using Wireshark to look at the package exchange and comparing with the check connection step, seems to me that the step when the wizard tries to connect to the status page is not answering the authentication demand made by the server (as presented in the image attached);
Essential information:
Windows 7 Entreprise
IntelliJ IDEA Version: Ultimate 2018.1 Build#IU-181.5087.20 (May 16, 2018)
SonarQube Server Version: 6.7.4 (build 38452)
SonarLint Plugin Version: 4.0.0.2916
SonarLint Console output:
Connection test failed
java.lang.IllegalStateException: Fail to request https://< hostname >/sonar/api/system/status
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.doCall(HttpConnector.java:196)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.get(HttpConnector.java:122)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.call(HttpConnector.java:109)
at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:116)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:97)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:61)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:51)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:66)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:59)
at org.sonarlint.intellij.tasks.ConnectionTestTask.run(ConnectionTestTask.java:53)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:434)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:565)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Failed to authenticate with proxy
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.java:401)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.java:218)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.RealConnection.connect(RealConnection.java:159)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at org.sonarsource.sonarlint.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at org.sonarsource.sonarlint.shaded.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at org.sonarsource.sonarlint.shaded.okhttp3.RealCall.execute(RealCall.java:77)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.doCall(HttpConnector.java:194)
… 23 more
Thank you and best regards,
David Pereira Barbosa