docker-proxy using port when no containers are running

17,987

Solution 1

Try:

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

From this ticket.

Solution 2

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

Solution 3

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

sudo snap remove docker

Solution 4

This can be because of unused networks. Instead of deleting the local-kv.db file, try the following command:

docker network prune

See docker network prune for more information.

Share:
17,987
Greg Samson
Author by

Greg Samson

Updated on June 05, 2022

Comments

  • Greg Samson
    Greg Samson almost 2 years

    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