Intermittent connectivity issues between SonarQube and BitBucket Cloud

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): SonarQube Enterprise Edition 9.0, Bitbucket Cloud
  • how is SonarQube deployed: zip
  • what are you trying to achieve: Reliable connection to Bitbucket for PR decoration
  • what have you tried so far to achieve this: Set up Bitbucket integration, successfully tested PR decoration, checked firewall for issues, checked DEBUG SonarQube logs

We’ve set up the integration with Bitbucket Cloud for PR decoration. While testing, we found that the “SonarQube” PR check in the “Details” pane on Bitbucket sometimes doesn’t appear. The SonarQube CE logs show this:

2023.08.15 05:08:55 WARN ce[XXXXXXXXXXXXX][c.s.G.D.A.B.A] Pull request decoration did not happen. Failed to access Bitbucket Cloud, the repository or the pull request: Error returned by Bitbucket Cloud

Back in SonarQube, we’ve clicked the “Check Configuration” button for the Bitbucket ALM integration, and it will sometimes (like 1 in every 10 times) fail with an “Unable to contact Bitbucket Cloud servers” message. I then see this 400 error log in the access.log:

10.XX.XX.XX - - [21/Aug/2023:14:57:51 -0400] “GET /api/alm_settings/validate?key=XXXXXX HTTP/1.1” 400 64 “http://sonarqube.mydomain.com:9000/admin/settings?category=almintegration” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36” “XXXXXXXXXXXXXXXXX”

I’ve checked our network firewall during these errors and don’t see any blocks. Does anyone have any ideas what else I can look into?

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

9.0 → 9.9.1 → 10.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann