Authentication issue with Jenkins integration after SonarQube upgrade from 9.9 to 10.6

We have an on-premise SonarQube server running Developer Edition 9.9.1.69595. We have a redirect site in IIS for SSL authentication. We upgraded to 10.6.0.92116. Logging into the UI is not an issue, but we discovered authentication issues with our Jenkins integration post upgrade. We use a SonarQube personal access token to authenticate. The following is the Jenkins build error:

Failed to request and parse ‘http://sonarqube.introniseng.com/api/settings/values?component=BNMSP_silverwind’: The remote server returned an error: (401) Unauthorized.

Could not authorize while connecting to the SonarQube server. Check your credentials and try again.

Pre-processing failed. Exit code: 1

We attempted to generate a new token, but the same error result. We changed the integration URL to SSL and non-SSL, but the same error result either way. We tried other builds that access other projects but the same error result. We have since rolled back the upgrade.

Seems so simple. It is just a PAT, yet authentication is failing when upgraded to 10.6.0.92116. Any ideas? Has anyone experienced the same?

We have determined that the 401 auth error is due to SonarQube 10.4+ requires the SonarScanner for .NET 5.14+, see SonarScanner for .NET . Once using a SonarScanner for MSBuild installations with 5.15 - >NET Fwk 4.6, we were able to get past the original authentication issue.

1 Like