SSL connection error - Connection reset by peer - On Homestead machine - laravel

We have an application using reCAPTCHA, the application works without problems on the production environment, but on mine new development homestead machine, I get the following error:
file_get_contents(): SSL: Connection reset by peer
I also have troubles using composer, there I get the following error:
[ErrorException]
zlib_decode(): data error
I think both errors are related to SSL.
Do I miss something, do I have to configure the CACERTS by hand?

The problem is related to VirtualBox as mentioned here.
After a downgrade of OSX (Sierra 10.12.1) VirtualBox from 5.1.8 to 5.1.6, the problem was solved.

Related

Can't install Laravel homestead using Vagrant on Windows 10

I have just downloaded the latest version of Vagrant 2.2.15 and VMware. I tried to run
vagrant box add laravel/homestead
But I get
The box 'laravel/homestead' could not be found or could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://vagrantcloud.com/laravel/homestead"]
Error: schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
After checking https://app.vagrantup.com/laravel/boxes/homestead I run
vagrant init laravel/homestead
Then try to run
vagrant up
But I never got it to work and keep getting the same error message. I found this solution https://github.com/hashicorp/vagrant/issues/6764 and installed MS Visual C++ 2010 x86 Redistributables but can't run vagrant up or don't even know how to install homestead after the last update. I used to install it the old same way without issues multiple times but today I couldn't
I tried
vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
But I get
There was an error while downloading the metadata for this box.
The error message is shown below:
schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
I checked the temp here .vagrant.d\tmp but it's empty.
Any help please on installing and running laravel homestead on Windows 10?
Disabling antivirus software (Kaspersky in my case) solved the problem for me.
For me It was Kaspersky as well, but you don't have to disable it everytime you can add an exception to Kaspersky network trusted addresses
Open Kaspersky
Click on the bottom left cog.
Open Network Settings
Click on Trusted addresses
add: vagrantcloud.com
save
Test
vagrant up
vagrant box add laravel/homestead
I assume if you having this issue and it's using another Antivirus the problem /solution is the same, or maybe some proxy intercepting https traffic.
We also only recently encountered this error when using the 2.2.15 version of Vagrant. Downgrading back to Vagrant 2.2.14 was our answer. This could be a Vagrant bug.
Temporarily disable web shield if you're using avast.
Tried adding the domains and app to a trusted list but still without success. This seemed to be the minimum to get the job done
My antivirus was avast, disabling worked for me as well

Laravel Brower Test (Dusk) error on MacOS (Docker): Failed to connect on localhost port 9515: connection refused

I just installed Laravel's Dusk to add browser tests. However, when I run a test, I get a Failed to connect on localhost port 9515: connection refused error.
I checked online and it seems like a lot of people are having the same issue. I came across few solutions e.g. this but it seems like they are all for Windows and Homestead whilst I am running my project on MacOS and Docker.
I did try to follow the solution but I found out sudo apt is not available for MacOS. I then installed Homebrew and tried to run the commands starting with brew instead of sudo apt but it responds saying no formula available for the name.
I would really appreciate it if you could recommend a solution or source I could look at. Thank you.
In case if someone else is having the same issue:
Basically, the issue was I was just following the Laravel Dusk Documentation without making any further configuration.
For the Docker environment, more configuration has to be done such as adding a Selenium container to allow the browser tests to run.
Checkout Jake Harris's 7 steps to running Laravel Dusk 3.0 tests in Docker environments to do this.
Thank you.

Vagrant up error : GnuTLS recv error (-9): A TLS packet with unexpected length was received

I have installed Vagrant 1.8.1 in my ubuntu 16. I have virtual box installed too.
while doing vagrant up I am getting error
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
GnuTLS recv error (-9): A TLS packet with unexpected length was received.
I gone through the other solutions but seems not working for me.
I tried to remove tmp folder of vagrant too. Please advise if someone knows the solution?
I have gone through many scenarios and finally comes up with solution. which can help other peoples. so I tried change combination of virtualBox version(5.0) and vagrant version (2.2.1), that solved my issue.

Unable to install vagrant plugin due to SSL_Connect error

Hello so I am trying to install a vagrant plugin but I getting the following error in mingW64
$ vagrant plugin install vagrant-winnfsd
Installing the 'vagrant-winnfsd' plugin. This can take a few minutes...
Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:
SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
Source: https://rubygems.org/
I am behind a firewall and have to pass the company cert manually. I updated my Ruby certs but still no luck. Anyone have any clue why vagrant is not taking my pem/certs?
Well funny thing. Vagrant uses its own certs. Inside of its folder:
the path is: C:\HashiCorp\Vagrant\embedded\cacert.cert on windows.
Add your company cert and you should be good to go.
I solved my own issue. Hopefully this helps someone else.

vagrant up - server not starting because a ssh library issue

I get this errormessage:
An error occurred in the underlying SSH library that Vagrant uses. The
error message is shown below. In many cases, errors from this library
are caused by ssh-agent issues. Try disabling your SSH agent or
removing some keys and try again.
It is my first time with vagrant.
I took a tour through this tutorial.
https://wpbeaches.com/setting-up-a-wordpress-vvv-vagrant-workflow/
I've windows 10, vagrant 1.8.5, Oracle VM newest version.
I read a lot about this issue but nothing helps me.
Maybe somebody knows a solution.
Please try this command
vagrant halt
from inside your homestead directory
I had the same issue and this resolved my issue

Resources