Proxy authentication doesn't work with last lts community edition and docker

Hello
I am trying to use sonarqube and marketplace on docker behind a proxy with authentication.

  • Using image sonarqube:9.8.0-community, I can connect to proxy using this tips
  • I have set HTTP_PROXYHOST, HTTP_PROXYPORT, HTTP_PROXYUSER, HTTP_PROXYPASSWORD(not pass to the jvm)
  • I had in SONAR_WEB_JAVAADDITIONALOPTS=-Dhttp.proxyUser=xx -Dhttp.proxyPassword=xxx -Dhttps.proxyUser=xxx -Dhttps.proxyPassword=xxx -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djdk.http.auth.tunneling.disabledSchemes=“”

Using image: sonarqube:9.8.0-community it’s ok.
Using image: sonarqube:lts-community it’s not ok. with


sonar-sonarqube-1  | Caused by: java.io.IOException: Failed to authenticate with proxy
sonar-sonarqube-1  |    at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:476)
sonar-sonarqube-1  |    at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:262)
sonar-sonarqube-1  |    at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:201)
sonar-sonarqube-1  |    at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
sonar-sonarqube-1  |    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
sonar-sonarqube-1  |    at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
sonar-sonarqube-1  |    at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
sonar-sonarqube-1  |    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
sonar-sonarqube-1  |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
sonar-sonarqube-1  |    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
sonar-sonarqube-1  |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
sonar-sonarqube-1  |    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
sonar-sonarqube-1  |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
sonar-sonarqube-1  |    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
sonar-sonarqube-1  |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
sonar-sonarqube-1  |    at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
sonar-sonarqube-1  |    at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
sonar-sonarqube-1  |    at org.sonar.core.util.DefaultHttpDownloader.executeCall(DefaultHttpDownloader.java:147)
sonar-sonarqube-1  |    at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:104)
sonar-sonarqube-1  |    ... 148 common frames omitted
sonar-sonarqube-1  |    Suppressed: java.io.IOException: Failed to authenticate with proxy
sonar-sonarqube-1  |            ... 167 common frames omitted
sonar-sonarqube-1  |    Suppressed: java.io.IOException: Failed to authenticate with proxy
sonar-sonarqube-1  |            ... 167 common frames omitted
sonar-sonarqube-1  |    Suppressed: java.io.IOException: Failed to authenticate with proxy
sonar-sonarqube-1  |            ... 167 common frames omitted

Regards

Hi,

Welcome to the community!

Is this the entire stacktrace? Also, can you remove the JavaOpts? The Docker image is configured with envvars.

 
Ann

Hello,
If I remove the Java opts, it doesn’t work with the 9.8 version
as attachement the stack trace
stacktrace.txt (113.1 KB)
If I remove the Java opts with the lts-community edition, I still have the issue
stacktrace-lts.txt (112.9 KB)
regards

Hi,

Thanks for checking. I’m going to flag this for the experts.

 
Ann

1 Like

It is indeed a bug in SonarQube.
The issue can be tracked here SONAR-20540

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.