[COMPASS-3358] Invoke-WebRequest Powershell cmdlet Fails to Negotiate TLS with Compass Installer API Created: 14/Dec/18  Updated: 10/Jan/24  Resolved: 04/Jan/19

Status: Closed
Project: Compass
Component/s: Build, Compass, Installation
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matt Lord (Inactive) Assignee: Matt Lord (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Compass_Install-Powershell_Failure.png    
Issue Links:
Depends
Documentation Changes: Not Needed

 Description   

The install_compass script on Windows is currently unable to download the Compass installer .exe. It appears unable to negotiate TLS for some reason. We can test the ultimate command that fails (see the attached screenshot as well):

PS C:\Windows\system32> Invoke-WebRequest -Uri https://compass.mongodb.com/api/v2/download/latest/compass-community/stable/windows -OutFile foo.exe
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ Invoke-WebRequest -Uri https://compass.mongodb.com/api/v2/download/la ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
 
PS C:\Windows\system32>

The download does seem to work in the Firefox and Edge web browsers, but curl also seemed to fail in negotiating TLS.

Perhaps the browsers are more lax... Did we make any recent changes to the TLS cert used for this API?

It may be that we need to add some additional code to the script, but the script was working as-is AFAIK.



 Comments   
Comment by Matt Lord (Inactive) [ 04/Jan/19 ]

This was fixed via the backports for SERVER-35936.

Generated at Wed Feb 07 22:32:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.