Docker "Error: network sandbox join failed" in CI
libnetwork builds a per-container network sandbox (its own netns, interfaces, and routes). When joining that sandbox fails - a stale sandbox left by a crashed container, a namespace setup race, or a momentary kernel/netlink hiccup - the container cannot start. This is usually a transient infrastructure failure rather than a config error.
What this error means
A container start fails with a sandbox join error from libnetwork. A retry, or a daemon restart, usually clears it.
docker
Error response from daemon: failed to create endpoint api on network bridge: failed to join network sandbox: error creating veth pair: operation not supportedCommon causes
A stale sandbox from a crashed container
A leftover network sandbox can block a new container from joining until it is cleaned up.
A namespace/netlink setup race
Creating the veth pair and joining the namespace can momentarily fail under load.
How to fix it
Re-run the container start
- Retry the start - sandbox join failures are usually transient.
Terminal
docker run --rm --network bridge myorg/api:1.4.2Clean up stale sandboxes via a daemon restart
- Restart the daemon to clear leftover sandboxes and namespaces.
Terminal
sudo systemctl restart dockerHow to prevent it
- Avoid leaving crashed containers with stale sandboxes.
- Restart the daemon to clear leftover network namespaces.
- Retry transient sandbox-join failures first.
Related guides
Docker "failed to set up container networking (bridge)" in CIFix "Error response from daemon: failed to set up container networking" on the bridge network in CI - the dae…
Docker "failed to create endpoint on network" in CIFix Docker "Error response from daemon: failed to create endpoint <name> on network <net>" in CI - a leftover…
Docker "failed to create shim task: OCI runtime create failed: executable file not found"Fix Docker "failed to create shim task: OCI runtime create failed ... executable file not found in $PATH" in…