Bobcares

Error invalid_zone docker – Methods to fix the error

by | Jul 2, 2021

Stuck with the Error invalid_zone docker? We can help you.

We may come across this error while we start docker using

sudo systemctl start dockerCopy Code
.

As part of our Docker Hosting services, we assist our customers with several Docker queries.

Today, let us see how to fix this error.

 

Error invalid_zone docker

Recently, we had a customer trying to start docker via

sudo systemctl start dockerCopy Code
. He had docker on centos 7. However, he came across:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

On receiving this output he went ahead with

systemctl status docker.serviceCopy Code
.

The result is as shown below:

Error invalid_zone docker

However, this output couldn’t provide him the cause of the error.

To know the cause we went ahead with:

dockerdCopy Code

From the last sentence of the output, we could figure out the obvious reason:

failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: INVALID_ZONE: docker

The problem of conflict, from essential, it should be

firewalld versus iptablesConflictCopy Code
.

 

How to fix this?

This can happen when the docker zone is not in the trusted list.

$ firewall-cmd --get-active-zonesCopy Code
FedoraWorkstation
interfaces: ens4u1u2 wlp59s0
docker
interfaces: br-48d7d996793a
libvirt
interfaces: virbr0
trusted
interfaces: docker0

Here, we can see that the interface docker0 seems to be in the trusted zone.  we can also see another zone, docker.

We add it to the docker zone instead using the command below:

$ sudo firewall-cmd --zone=docker --change-interface=docker0Copy Code

Alternatively, we try to temporarily disable firewalld. This is an effective way.

```
systemctl stop firewalld
systemctl disable firewalld
```Copy Code

On the other hand, we can also try to update the existing Docker.

Installing Docker on Centos has requirements for the Linux version. The latest Docker does not support the old version of CentOS.

sudo yum -y updateCopy Code

[Need help with the fix? We’d be happy to assist you]

 

Conclusion

To conclude, we can fix this error either via an update or by stopping firewalld. In short, we saw how our Support Techs fix the error.

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!