Patricius
Explore posts from serversDockerized .NET8 API not accessible.
When I try curl I get "(56) Recv Failure. Connection refused by peer."
Docker compose
Dockerfile
What I already tried:
- Running it outside Docker, it works.
- Running curl commands inside Docker, they work.
- Made sure that my app listens to port 8080.
- Changing port from 5282 to 8080. Port 5282 now gets failure 7, 8080 now gets error 56 similarly to what 5282 was getting. "Recv failure. Connection refused by peer."
- Researched online, from what I understand this issue is .NET8 specific and has to do with "Kestrel" not allowing traffic from outside of local device.
I am just using the weatherforecast template, so I have not written any code yet. I am on MacOS Sonoma 14.5 if that helps.
28 replies