Docker Community Forums

Share and learn in the Docker community.

Problem starting docker after trying to change default network


(Lucadom72) #1

hi guys,
im trying to customize docker to start with the network i want and the bridge interface with the IP i want.

this is my environment:
Centos 7.3 1611
kernel: 3.10.0-514.26.1.el7.x86_64
Docker docker-ce-17.06.0.ce-1.el7.centos.x86_64

i created my daemon.json:
{
“bip”: “172.24.1.1/24”,
“fixed-cidr”: “172.24.0.0/16”,
“mtu”: 1500,
“default-gateway”: “172.24.1.1”,
“dns”: [“8.8.8.8”, “8.8.4.4”]
}

after the install i stoppped the docker and did the following in order to delete the previous docker0 interface:
iptables -t nat -F POSTROUTING
ip link set dev docker0 down
ip addr del 172.17.0.1/16 dev docker0

then i created a new one:
ip addr add 172.24.1.1/24 dev docker0
ip link set dev docker0 up

when i tried to start docker again ive got the following on the logs:
– Unit docker.service has begun starting up.
Aug 17 18:11:55 dockerd[5801]: time=“2017-08-17T18:11:55.411218094+02:00” level=info msg="libcontainerd: new containerd process, pid: 5807"
Aug 17 18:11:56 dockerd[5801]: time=“2017-08-17T18:11:56.415806095+02:00” level=warning msg=“overlay: the backing xfs filesystem is formatted without d_typ
Aug 17 18:11:56 dockerd[5801]: time=“2017-08-17T18:11:56.415847690+02:00” level=info msg=”[graphdriver] using prior storage driver: overlay"
Aug 17 18:11:56 dockerd[5801]: time=“2017-08-17T18:11:56.419238500+02:00” level=info msg="Graph migration to content-addressability took 0.00 seconds"
Aug 17 18:11:56 dockerd[5801]: time=“2017-08-17T18:11:56.419735644+02:00” level=info msg="Loading containers: start."
Aug 17 18:11:56 dockerd[5801]: Error starting daemon: Error initializing network controller: Error creating default “bridge” network: failed to allocate se
Aug 17 18:11:56 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Aug 17 18:11:56 0 systemd[1]: Failed to start Docker Application Container Engine.
– Subject: Unit docker.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit docker.service has failed.

any idea ???

best regards,
Luca


(Anoop) #2

What is the error / output of sudo journalctl -fu docker?


(Lucadom72) #3

i fixed it thanks, a mistake in daemon.json…
a newbie dumb question


(Arcotek) #4

@lucadom72, I know it’s been a while, but is there any chance you could highlight your error / post a working daemon.json?

Many thanks.


(Anon2011) #5

You should post your fix here; don’t just say THAT it was fixed. That’s no help at all.