Docker Community Forums

Share and learn in the Docker community.

Docker not releasing ports even after clean restart


(Ibrahimpatel89) #1

Docker is not releasing port even after killing/deleting earlier docker containers and also restarting the service, as per a solution in docker forum also removed “local-kv.db” file present in /var/lib/docker/network/files and restarting the service still the issue persists, i:e docker keeps the hold of the port somewhere.
Please help with a proper solution.
Docker Version: 17.05.0-ce

-bash-4.1$ docker run -d --name wlscitae -p 61020:61020 wlscitaedomain
docker: Error response from daemon: driver failed programming external connectivity on endpoint wlscitae (1ab7d82e82913c4b6740c2ba4055b5f840c79b877a10abe2469e42fa3a418170): Error starting userland proxy: listen tcp bind: address already in use.
-bash-4.1$ netstat -an|grep 61020
tcp 0 0* LISTEN

-bash-4.1$ ls -lrt
total 44
-rw-r–r--. 1 root root 65536 Aug 7 16:12 local-kv.db
-bash-4.1$ rm -rf local-kv.db
-bash-4.1$ sudo service docker stop
Stopping docker: [ OK ]
-bash-4.1$ sudo service docker start
Starting docker: . [ OK ]
-bash-4.1$ netstat -an|grep 61020
tcp 0 0* LISTEN