Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The request was aborted: Could not create SSL/TLS secure #67

Open
basictheprogram opened this issue May 18, 2022 · 9 comments
Open

The request was aborted: Could not create SSL/TLS secure #67

basictheprogram opened this issue May 18, 2022 · 9 comments

Comments

@basictheprogram
Copy link

Just started having this problem today.

==> default: Running provisioner: shell...
    default: Running: shell/InstallChocolatey.ps1 as C:\tmp\vagrant-shell.ps1
    default: powershell.exe : Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
    default:     + CategoryInfo          : NotSpecified: (Exception calli...SSL/TLS secure :String) [], RemoteException
    default:     + FullyQualifiedErrorId : NativeCommandError
    default: channel."
    default: At C:\tmp\vagrant-shell.ps1:70 char:7
    default: +       iex ((new-object net.webclient).DownloadString('https://chocolatey.org/ins ...
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    default:     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    default:     + FullyQualifiedErrorId : WebException
    default:
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    default: the spelling of the name, or if a path was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:78 char:1
    default: + choco feature enable -n autouninstaller
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default:
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    default: the spelling of the name, or if a path was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:79 char:1
    default: + choco feature enable -n allowGlobalConfirmation
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default:
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    default: the spelling of the name, or if a path was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:80 char:1
    default: + choco feature enable -n logEnvironmentValues
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default:
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file "C:\tmp\vagrant-shell.ps1"

Stdout from the command:



Stderr from the command:

powershell.exe : Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
    + CategoryInfo          : NotSpecified: (Exception calli...SSL/TLS secure :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
channel."
At C:\tmp\vagrant-shell.ps1:70 char:7
+       iex ((new-object net.webclient).DownloadString('https://chocolatey.org/ins ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\tmp\vagrant-shell.ps1:78 char:1
+ choco feature enable -n autouninstaller
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\tmp\vagrant-shell.ps1:79 char:1
+ choco feature enable -n allowGlobalConfirmation
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\tmp\vagrant-shell.ps1:80 char:1
+ choco feature enable -n logEnvironmentValues
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
@pauby
Copy link
Member

pauby commented May 20, 2022

What OS are you running vagrant on? What troubleshooting have you done?

@Xav83
Copy link

Xav83 commented Oct 6, 2022

Hi to all 🙂

I am also having this issue, when running vagrant on Ubuntu, with Vagrant 2.3.1 and VirtualBox 6.1. Currently, I am using the workaround described in this Stackoverflow thread.

@pauby
Copy link
Member

pauby commented Nov 25, 2022

@Xav83 I'm assuming this is what you ran:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Where did you run this?

@Xav83
Copy link

Xav83 commented Nov 25, 2022

@pauby Yes, this is the line I ran in the Powershell terminal, in the Windows Virtual Machine launch via Vagrant (i don't know if this is really clear 😅).

@pauby
Copy link
Member

pauby commented Nov 26, 2022

I've just brought this box up in Windows 10 21H2, Hyper-V and Vagrant 2.3.3 and didn't see this issue.

Could it be an Ubuntu issue? Thinking out loud, could it be that it doesn't have the (old) ciphers that Windows Server 2012 R2 uses for WinRM?

@slycordinator
Copy link

I get the same output above running the commands from my work which has started using a self-signed certificate through a proxy.

I can make vagrant itself use the certificate with the SSL_CERT_FILE and CURL_CA_BUNDLE variables; I just copied vagrant's embedded pem file to a location and appended the self-signed cert to it and had the above variables point to the file.

But I've not found a way to get powershell scripts inside the created VM to use include the certificate to let it download.

I added the config.vm.box_download_ca_cert variable in the Vagrantfile, but that didn't do anything with regards to the behavior of the powershell scripts; there's a chance they're ignoring the system certificates (using something like the certifi pypy package) and also the chance that the variables above don't do anything to make the VM's system store use the additional cert.

@pauby
Copy link
Member

pauby commented Apr 21, 2023

@slycordinator This sounds very much like a Vagrant issue and not limited to the use of this box?

@slycordinator
Copy link

slycordinator commented Apr 22, 2023 via email

@pauby
Copy link
Member

pauby commented Apr 24, 2023

As it's not related to the Box, fixing a Vagrant issue in the Box doesn't feel like the correct place.

If this is a Vagrant issue, it should be raised with Vagrant to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants