Error reported: Bridge docker0 failed: exchange full
the default docker0 bridge only supports 1024 links. If it exceeds 1024, it will report bridge docker0 failed: exchange full
you can remove the restriction by creating another network bridge. When docker run creates a container, you specify our own network bridge. Of course, we only support 1024 network bridges. You can use this method to create unlimited network bridges as long as there is enough memory to create a docker container
1. View Bridge
[root@bj ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
0c49b2d827f5 bridge bridge local
8ec28361848f host host local
3b929af4064c none null local
2. Create Bridge
[root@bj ~]# docker network create xinnet
[root@bj ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
0c49b2d827f5 bridge bridge local
8ec28361848f host host local
3b929af4064c none null local
604ccc72661a xinnet bridge local
[root@bj ~]# docker network inspect xinnet
[
{
"Name": "xinnet",
"Id": "604ccc72661af52f0889bfea4664d70e899427418b1a9301d8a46e6ce95e46ee",
"Created": "2021-12-08T13:50:43.973901095+08:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"e92f81a6fe11b6e2c82de38fbe4e06a9cfcdb1dcd1f64485e5b805e3714bd163": {
"Name": "zabbix-agent-22000",
"EndpointID": "b7ac1a57b2e91435c676a7b4203ab50237893a3714aff185d8cdac45b1251356",
"MacAddress": "02:42:ac:13:00:02",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
3. Create container specified bridge – network
[root@bj ~]# docker run -m 100m --name zabbix-agent-22001 --network=xinnet -e HOSTNAME="TEST22001" -e ZBX_HOSTNAME="TEST22001" -e ZBX_SERVER_HOST="10.20.9.246" -p 22001:10050 -e ZBX_SERVER_PORT=10051 -d zabbix-agent:4.0.35
[root@bj ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e92f81a6fe11 zabbix-agent:4.0.35 "/usr/bin/tini -- /u…" 15 minutes ago Up 15 minutes 0.0.0.0:22001->10050/tcp zabbix-agent-22001
If – network is not specified, the created containers will be hung on docker0 by default, and the IP of docker0 interface on the local host will be used as the default gateway for all containers
Read More:
- [Solved] CentOS build a docker error: job for docker.service failed….
- [Solved] Docker Start Error: iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 10241
- Docker Create or Start Nginx Error: docker: Error response from daemon: driver failed programming external connectivity
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- How to Fix ERROR Couldn’t connect to Docker daemon at http+docker://localunixsocket
- [Solved] Docker Error: got permission denied while trying to connect to the docker daemon socket at…
- Docker Open Error: Warning: docker.service changed on disk. Run ‘systemctl daemon-reload‘ to reload unit
- Docker Error response from daemon: Get https://registry-1.docker.io/v2/portainer/portainer/…
- [Solved] SecureCRT Error: Key exchange failed. No compatible key exchange method.
- Docker Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate has expired or is not yet valid
- [Solved] docker: Error response from daemon: driver failed programming external connectivity on endpoint mysql-test …
- [Solved] Docker: Error response from daemon: driver failed programming external connectivity on endpoint mysq
- ubuntu docker dm_task_run failed error [How to Solve]
- Docker Build Error: Failed to get D-Bus connection: Operation not permitted [Solved]
- [Solved] Docker failed to start daemon: error initializing graphdriver: driver not supported
- [Solved] Docker Error: driver failed programming external connectivity on endpoint
- [Solved] docker Error response from daemon OCI runtime create failed container_linux.go380
- [Solved] System.InvalidOperationException: Failed to deploy distro docker-desktop……
- [Solved] Job for docker.service failed because the control process exited with error
- [Solved] Docker Error: Failed to connect to bus: Host is down