Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-proxy using port when no containers are running

Tags:

docker

ubuntu

On a ubunty 1404 machine, docker-proxy is using port 6379, however there are no docker containers running.

$ sudo netstat -tulpn | grep docker    
tcp6       0      0 :::6379                 :::*                    LISTEN      28438/docker-proxy
tcp6       0      0 :::2376                 :::*                    LISTEN      28266/dockerd
$ docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS       PORTS               NAMES
$

After I stop docker service, this process is gone, and that port is available, however when I start docker back up, docker-proxy is still using that port even though there are no docker containers running.

$ docker info
## Output:
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge null host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 4.2.0-38-generic
Operating System: Ubuntu 14.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 31.32 GiB
Name: xxxxx
ID: LILE:5WFT:2EPL:OXCN:GZG7:C4WE:AFCX:LNAT:TBMG:XQFP:QX7W:XLYK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
 127.0.0.0/8
like image 834
Greg Samson Avatar asked Aug 24 '16 18:08

Greg Samson


3 Answers

Try:

sudo service docker stop sudo rm -f /var/lib/docker/network/files/local-kv.db

From this ticket.

like image 81
Dean Rather Avatar answered Oct 17 '22 15:10

Dean Rather


This worked for me on Linux, and without having to delete any resources.

# Stop docker
sudo service docker stop

# Find your particular zombie proxy processes
sudo netstat -pna | grep docker-proxy
# tcp6       0      0 :::8025       :::*     LISTEN      <PID_A>/docker-proxy  
# tcp6       0      0 :::13306      :::*     LISTEN      <PID_B>/docker-proxy
# ...

# Kill them
sudo kill -9 PID_A PID_B ...

# restart
sudo service docker start
like image 19
Steve Clay Avatar answered Oct 17 '22 13:10

Steve Clay


I uninstalled Docker with apt, but turns out I have another version of Docker installed with snap.

sudo snap remove docker
like image 4
Philip Rego Avatar answered Oct 17 '22 13:10

Philip Rego