I am running my docker daemon as-
docker -d --kv-store=consul:10.240.222.136:8500 --label=com.docker.network.driver.overlay.bind_interface=eth0 --default-network=overlay:multihost -H tcp://10.240.27.97:2376
and when I run any container, I get following error-
network sandbox join failed: error creating vxlan interface: file exists
I've tried deleting my consul data, and then restarting docker daemon but problem persists.
Seems like the problem occurs when a vxlan interface already exists. How do I go about cleaning up networking related data? I've already tried rm -rf /var/lib/docker/*
Docker info -
root@dockerhost1:/home/gaurav# docker info
Containers: 4
Images: 2
Engine Version: 1.9.0-dev
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 10
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 1
Total Memory: 1.665 GiB
Name: dockerhost1
ID: QHYT:4DUN:6YKL:IJ3Q:CMSU:6F7J:U4SK:2BU4:24WT:3PX2:ZNN2:2G7H
WARNING: No memory limit support
WARNING: No swap limit support
Labels:
com.docker.network.driver.overlay.bind_interface=eth0
Experimental: true
@gauravphoenix I am not sure how you ended up in that situation. But to recover from it you can bring down docker and then do tha following:
sudo umount /var/run/docker/netns/*
sudo rm /var/run/docker/netns/*
@mrjana that worked. Thanks.
I've also came across the same problem. And seems like other people too. Your solution seems to work, but I'm worried something in the documentation leads us to this state.
In my case it was an issue with docker_gwbridge docker network. This network was missing on the worker node which result following error on that worker node.
Error:
network sandbox join failed: subnet sandbox join failed for "14.2.1.0/24": error creating vxlan interface: file exists
starting container failed: error creating external connectivity network: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
To fix the above errors i have created the docker network manually using below command..
docker network create \
--subnet 172.18.0.0/16 \
--gateway 172.18.0.1 \
-o com.docker.network.bridge.enable_icc=false \
-o com.docker.network.bridge.name=docker_gwbridge \
docker_gwbridge
Most helpful comment
@gauravphoenix I am not sure how you ended up in that situation. But to recover from it you can bring down docker and then do tha following: