Devops Platform Integrations Azure Devops Invalid Azure URL or Personal Access Token

I’m trying to configure the DevOps Platform Integrations for Azure Devops, and I’m getting “Invalid Azure URL or Personal Access Token”. When I set logs to debug level, I get this:
Unable to contact Azure DevOps server for request [https://myAzDOUrl/myCollection/_apis/projects?api-version=3.0]: [Unexpected response code for CONNECT: 503]

  • which versions are you using: SonarQube 9.9.1 Developer
  • how is SonarQube deployed: zip
  • what are you trying to achieve: Configure DevOps Platform Integrations for Azure Devops
  • what have you tried so far to achieve this: Created the configuration (devops url and PAT)

Hey there.

Typically a 503 would indicate something not available on the Azure DevOps side.

A good first troubleshooting step would be to curl the same URL from your SonarQube server using the URL mentioned in the DEBUG logs and the PAT that you’ve configured.

You could also use a tool like Postman for this if you aren’t comfortable on the command line.

Yeah, that 503 is odd I agree. I tried testing the PAT with powershell from the sonarqube server to the azure devops server and it is able to connect.

Thanks for the follow-up @jbruno

Do you have anything configured so far as proxies between your SonarQube server and the rest of the world? This would be configuration like http.proxyHost in your conf/ file. If so, you might need to exclude your Azure DevOps server (in the same file, using http.nonProxyHosts).

yes, it is going through a proxy. I tried adding the http.nonProxyHost=myAzureDevopsUrl, but still getting the same result. Do I need to restart the SonarQube windows service after updating the file?

Looks good now!! I actually needed to use http.nonProxyHosts (with an ‘s’ at the end), and then restart the sonarqube windows service. Once I did that it shows as “Configuration valid” in the DevOps Platform integrations section. Thanks Colin!

1 Like

Whoops, I thought I copied it exactly from the config file. Sorry for the confusion and thanks for the follow-up!