I’ve been using docker version 20.10.9 in linux.
This week I was trying to run an image that always worked using ports localhost:8500 or localhost:8501 , but suddenly it stopped to work in localhost and just works in the internal container IP like 172.17.0.2:8500 or 172.17.0.2:8501.
If I try to use localhost or 0.0.0.0 again I get connection refused, but the ports are listening normally using the command sudo lsof -i -P -n | grep 8500 or sudo lsof -i -P -n | grep 8501
Docker service status also looks normal.
telnet command for 172.17.0.2 works but for localhost I have my connection refused.
I already tried to restart docker and reload daemon , even tried to reinstall docker , but the problem persists.
I really wanted to use localhost again and really wanted to find a solution without need to reboot, since I am working with remote access in the server of my company .