Are you trying to resolve the error message 'docker error initializing network controller' ?
This guide will help you.
docker failed to start daemon: Error initializing network controller no network available affects the docker service.
This error happens in the process of trying to start the docker service.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix Docker related errors.
In this context, we shall look into how to resolve this Docker error.
Methods to resolve the error 'Docker error initializing network controller' ?
To fix this issue, start by applying the tips given below.
1. Several network cards
One of our customers had approached us with the below error message:
Error starting daemon: Error initializing network controller: Error creating default "bridge" network: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network
He received the error message while trying to start the docker service by running the below command:
# systemctl start docker.service
This error was relating to the machine having many network cards.
So we suggested our customer to start the docker manually:
/usr/bin/docker daemon --debug --bip=192.16x.y.x/24
Here, the 192.16x.y.x is the main machine IP and /24 is the IP netmask.
i. Docker will use this network range for building the bridge and firewall rules.
ii. After that, we suggested killing the docker and start as usual.
iii. Now, the docker creates a cache config for the –bip and will work without it.
2. Deleting the local-kv.db file
In some cases, the local-kv.db file may get overwritten by another daemon instance. So we suggest deleting it.
3. Activating firewalld
Sometimes, the firewalld might be stopped. So activating it can resolve the error.
So we suggest our customers in activating it as well and see if the error resolves.
Here is the command to activate it:
systemctl start firewall