Unable to contact Bitbucket server: Unexpected response code for CONNECT: 403

Hello.

We have just installed SonarQube Developer edition and we encounter a problem for the connection with BitBucket.

we get this message in the logs:

2022.10.17 14:22:46 INFO  web[][o.s.a.c.b.BitbucketServerRestClient] Unable to contact Bitbucket server: Unexpected response code for CONNECT: 403
java.io.IOException: Unexpected response code for CONNECT: 403
	at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:483)
	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.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.doCall(BitbucketServerRestClient.java:139)
	at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.doGet(BitbucketServerRestClient.java:122)
	at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.validateUrl(BitbucketServerRestClient.java:73)
	at org.sonar.alm.client.bitbucketserver.BitbucketServerSettingsValidator.validate(BitbucketServerSettingsValidator.java:44)
	at org.sonar.server.monitoring.devops.BitbucketMetricsTask.validate(BitbucketMetricsTask.java:67)
	at org.sonar.server.monitoring.devops.BitbucketMetricsTask.run(BitbucketMetricsTask.java:56)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

SonarQube ID information
Server ID: 0EEA273A-AYPHNPFAbR6wMOZxXtik
Version: 9.6.1.59531
Date: 2022-10-17

Hi,

Welcome to the community!

403 is forbidden. Have you verified your connection information with the ‘Check Configuration’ button? Are you sure you’re using the Personal Access Token of an account with rights to do what you’re trying to do?

 
Ann

hello.
everything is now ok. Our infrastructure had incorrectly configured the proxy in sonarqube (at the exception level)

1 Like

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