Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fugues's avatar

Laravel cURL & Guzzle Error

Hi, I'm using guzzlehttp/guzzle package to make a call to an API, all my project used to work and it works on production correctly, but i just reinstall homestead and when i try to do some api call i got the follow exception and i can't fixed.

Any ideas what is it?

cURL error 56: Recv failure: Connection reset by peer (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
0 likes
6 replies
willvincent's avatar

is the API behind a firewall that is not whitelisting your local dev environment IP? Or is there additional authentication information you need to send/headers/etc that you're not sending?

The remote server has sent you a RST packet, which indicates an immediate dropping of the connection, rather than the usual handshake. This bypasses the normal half-closed state transition. I like this description: "Connection reset by peer" is the TCP/IP equivalent of slamming the phone back on the hook.

fugues's avatar

Mmmm I just install Homestead and clone my repo to a new machine, in other homestead machines is working correctly. So no idea what can be causing this problem.

AndoGrando's avatar

Having the same issue after being able to rip things out no problem for months. The only thing that changed was installing homestead....

philryan74's avatar

May be worth trying the direct composer way:

composer create-project laravel/laravel example

Please or to participate in this conversation.