AI CodeFix initialization error

Hi,

I upgraded to Sonarqube 10.8 with an Enterprise license from 9.9 via the docker image. ( v10.8.1 (101195)[ACTIVE])
I’m trying to enable “AI Codefix” but I get an error message:
“The AI ​​CodeFix service is reachable but returned an error. Check logs for more details.”

The logs show this error message:

2025.01.04 20:28:41 WARN web[575efb86-75bc-4de4-adb7-2071b5e23364][c.s.f.s.api.M.O] Error while checking AI CodeFix service status
java.io.IOException: Failed to authenticate with proxy
 at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:476)
 at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:262)
 at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:201)
 at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
 at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
 at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
 at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
 at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
 at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
 at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
 at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
 at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
 at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at com.sonar.fix.suggestions.api.M.O.澚(Unknown Source)

However, the proxy authentication information is well-informed and seems to work well: the marketplace offers a list of plugins.

Have you an idea ?

Thank You.
Julien

Hi Julien,

Have you configured your proxy settings so that your SQ Server can access https://api.sonarqube.io where the AI ​​CodeFix cloud service is running?

Hi Serhat,

Yes the proxy allows access to this url, and I see in its log the access attempt but with a “407” error, authentication problem. That’s why I have the impression that the proxy authentication information is not taken into account.
For information, in the sonar.properties file, we add the java options
-Djdk.http.auth.tunneling.disabledSchemes=“”
-Djdk.http.auth.proxying.disabledSchemes=“”
to sonar.web.javaOpts so that BASIC authentication to the proxy works.
But maybe we should add it to “sonar.ce.javaOpts” as well? or another setting?

Thank You

Hi Julien,

Indeed! The proxy credential is not taken into account by the Fix Suggestion service. It needs a fix in the SQ Server. You can track it here SONAR-24165.

Thanks for reporting the issue.

Hi Serhat,

Thanks for reporting the issue.
I’ll follow the ticket to see when the fix will be available so we can test this feature.

1 Like