When attempting to run a basic Docker container after upgrading from Debian Wheezy to Jessie, many users encounter this network-related error:
Error response from daemon: Cannot start container 4145d0fccd96b904e4ab4413735f1129b8765429bad5be71dc8d5f4c0760666d:
failed to create endpoint high_saha on network bridge:
failed to add the host (veth7f6f907) <=> sandbox (veth788d9dc) pair interfaces: operation not supported
The error typically occurs due to:
- Kernel version mismatch with Docker requirements
- Missing or incorrect veth kernel module
- Network namespace support issues
- Incomplete upgrade artifacts
First check your current kernel version:
uname -r
Then verify veth module availability:
lsmod | grep veth
Option 1: Kernel Upgrade
Install the latest backported kernel:
sudo apt-get update
sudo apt-get install -t jessie-backports linux-image-amd64
Option 2: Manual Module Loading
Try manually loading the required modules:
sudo modprobe veth
sudo modprobe bridge
Option 3: Docker Clean Reinstall
Completely remove and reinstall Docker:
sudo apt-get purge docker-engine
sudo rm -rf /var/lib/docker
sudo apt-get install docker-engine
For persistent issues, modify Docker's network configuration:
sudo nano /etc/docker/daemon.json
Add these experimental network settings:
{
"experimental": true,
"ipv6": false,
"iptables": true,
"bridge": "none"
}
After applying fixes, verify Docker networking with:
docker network inspect bridge
docker run --rm hello-world
After upgrading from Debian Wheezy to Jessie, many users encounter this specific Docker networking error when attempting to run containers. The full error message typically appears as:
Error response from daemon: Cannot start container [CONTAINER_ID]:
failed to create endpoint [ENDPOINT_NAME] on network bridge:
failed to add the host (vethXXXXXX) <=> sandbox (vethXXXXXX) pair interfaces: operation not supported
This error occurs because the upgraded system lacks proper kernel support for Docker's network bridge functionality. Jessie's default kernel (3.16) may not include all necessary modules, especially when running in virtualization environments.
Key missing components:
- veth kernel module not loaded
- Bridge networking features disabled
- Potential AppArmor/SELinux conflicts
First, check your current kernel version:
uname -r
lsmod | grep veth
If no output appears for veth, the module isn't loaded.
As root, execute:
modprobe veth
modprobe bridge
To make these changes persistent:
echo "veth" >> /etc/modules
echo "bridge" >> /etc/modules
For Jessie systems, consider upgrading to a newer kernel:
apt-get update
apt-get install -y linux-image-amd64
reboot
Edit/create /etc/docker/daemon.json:
{
"iptables": false,
"bridge": "none"
}
Then restart Docker:
systemctl restart docker
After applying any solution, verify with:
docker run --rm hello-world
If issues persist, examine Docker's debug output:
dockerd --debug
journalctl -u docker -f
Check network interfaces:
ip link show
brctl show