Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curl (56) Recv failure: Connection reset by peer - when hitting docker container

getting this error while curl the application ip

curl (56) Recv failure: Connection reset by peer - when hitting docker container

like image 319
sysadmin umesh Avatar asked Sep 19 '25 05:09

sysadmin umesh


1 Answers

Do a small check by running:

docker run --network host -d <image>

if curl works well with this setting, please make sure that:

  1. You're mapping the host port to the container's port correctly:
docker run -p host_port:container_port <image>
  1. Your service application (running in the container) is running on localhost or 0.0.0.0 and not something like 127.0.0.1
like image 178
Tomasz Bartkowiak Avatar answered Sep 23 '25 05:09

Tomasz Bartkowiak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!