I am running a Flask app on port 5000 within a Docker container.
If I call the web service from within the container, it responds. If I call the web service from Postman on my laptop, where the container is running, I get
POST http://127.0.0.1:5000/predict
Error: socket hang up ←
I do have port 5000 open – If I run
docker ps
I see
888f4ebc15f9 hh_regression_app “python hh_regressio…” 32 minutes ago Up 32 minutes 0.0.0.0:5000->5000/tcp busy_chaplygin
I think this part means I have the port open right? “0.0.0.0:5000->5000/tcp”
Another interesting thing to note – I installed tcpdumb onto the container and listened on port 5000
The container knows I’m trying to talk to it. It sees my incoming requests. It just won’t do anything w them – I just always get a “go away” kind of error – From Python it looks like this:
ConnectionError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))
Is this some kind of permissions thing? Is there anyway for me to tell? Or, instead of jumping to conclusions, does anyone know what is going on here/how to fix? Thank You!!