Fail to request https://sonar.etas-dev.com/api/system/status
java.lang.IllegalStateException: Fail to request https://sonar.etas-dev.com/api/system/status
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.doCall(HttpConnector.java:165)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.get(HttpConnector.java:111)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.call(HttpConnector.java:100)
at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:108)
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:48)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:43)
at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:324)
at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.io.IOException: Failed to authenticate with proxy
at okhttp3.internal.io.RealConnection.createTunnel(RealConnection.java:318)
at okhttp3.internal.io.RealConnection.buildTunneledConnection(RealConnection.java:152)
at okhttp3.internal.io.RealConnection.connect(RealConnection.java:108)
at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:187)
at okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:123)
at okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:93)
at okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:296)
at okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at okhttp3.RealCall.getResponse(RealCall.java:243)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
at org.sonarsource.sonarlint.core.util.ws.OkHttpClientBuilder.completeHeaders(OkHttpClientBuilder.java:183)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
at okhttp3.RealCall.execute(RealCall.java:57)
at org.sonarsource.sonarlint.core.util.ws.HttpConnector.doCall(HttpConnector.java:162)
... 11 more
public OkHttpClient build() {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.proxy(proxy);
if (connectTimeoutMs >= 0) {
builder.connectTimeout(connectTimeoutMs, TimeUnit.MILLISECONDS);
}
if (readTimeoutMs >= 0) {
builder.readTimeout(readTimeoutMs, TimeUnit.MILLISECONDS);
}
builder.addInterceptor(this::completeHeaders);
ConnectionSpec tls = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS).allEnabledTlsVersions()
.allEnabledCipherSuites().supportsTlsExtensions(true).build();
builder.connectionSpecs(asList(tls, ConnectionSpec.CLEARTEXT));
X509TrustManager trustManager = sslTrustManager != null ? sslTrustManager : systemDefaultTrustManager();
SSLSocketFactory sslFactory = sslSocketFactory != null ? sslSocketFactory
: systemDefaultSslSocketFactory(trustManager);
builder.sslSocketFactory(sslFactory, trustManager);
// set proxy authenticator
if (proxyLogin != null) {
builder.proxyAuthenticator((route, response) -> {
Request.Builder newRequest = response.request().newBuilder();
return newRequest
.header("Proxy-Authorization", Credentials.basic(proxyLogin, nullToEmpty(proxyPassword)))
.build();
});
}
return builder.build();
}--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/60aa7a66-dd4e-49e3-b96d-c977dc49542f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
Of course I can submit a pull request. Should I include the removed lines of the interceptor?
Should I apply the changes to org.sonarqube.ws.client.OkHttpClientBuilder as well?
Seems to be copy of org.sonarsource.sonarlint.core.util.ws.OkHttpClientBuilder (or vice versa ;-))
Julien Henry | SonarSource
Developer
http://sonarsource.com