Could not create SSL/TLS secure channel - 'https://ext.sonarqube.{company}.com/api/server/version'

.NET Framework 4.8
Sonar scanner version (plugin integrated with team city pipeline) - 5.13.0.xxxx
Sonar url to hit - https://ext.sonarqube.ihsmarkit.com/api/server/version

Build agent box - Windows server 2012 R2

Hi Team,
While trying to set up and run the sonar scanner in the team city pipeline, I faced the below-mentioned issue related to SSL/TLS connection from Windows 2012 R2 server box (build agent box) to sonarurl - https://ext.sonarqube.ihsmarkit.com/api/server/version.

After going through a few articles seems that due to recent technical updates on the sonar side, there are some connectivity issues from Windows 2012 r2 server to the sonar.

Could you please look into it and help to know the exact root cause and solution for this SSL/TLS connection? Is there any TLS setting or cipher addition required here?

Please have a look at the below logs -

Creating directory: C:\BuildAgent\work\88599620b320426e.sonarqube\out
Fetching server version…
Downloading from https://ext.sonarqube.ihsmarkit.com/api/server/version
Unable to connect to server. Please check if the server is running and if the address is correct.
Url: ‘https://ext.sonarqube.ihsmarkit.com/api/server/version’.
System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
An error occured while querying the server version! Please check if the server is running and if the address is correct.
Pre-processing failed. Exit code: 1
Process exited with code 1
Process exited with code 1 (Step: Start Sonar Analysis (SonarScanner for MSBuild: begin analysis))

Hey there.

Depending on what requirements the proxy sitting in front of your SonarQube server has set for TLS/SSL connections, it’s possible Windows 2012 R2 can’t meet those requirements. For example, Windows 2012 R2 doesn’t support TLS 1.3.

So @Colin , In short, shall we conclude this to - no other option other than upgrading from Windows 2012 R2 server to 2016 or 2019 in that case?

I’m not sure – it will require further investigation on your part to understand how the reverse proxy sitting in front of your SonarQube server is configured, and why it might reject certain TLS/SSL connections!