Error starting daemon: Error initializing network controller: error obtaining controller instance

Hello,

I’m getting the below Error while running a pipeline in Drone 1.3 at my k8’s cluster.

“Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.1: can’t initialize iptables table `nat’: Permission denied”

“Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”

Setup Details.

Environment: Kubernetes - v1.11.8
Docker version: 18.6.2
Drone running mode : Only the server without having runner.

I have gone through couple of existing threads(Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running) which is about the Docker daemon but that is not helping.

Please let me know for any other information in this regard.

Regards,
Ranjith

2 Likes

@bradrydzewski Can you please check my post?

I have same error after run of Ubuntu 18 as subsystem Linux under Win 10 when i did try run docker and then i did check 'sudo dockerd", it appears same error with NAT as you had.

In my case, I was running Ubuntu in a Docker. I had the exact same symptom sudo dockerd:

failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.1: can’t initialize iptables table `nat’: Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)

I had to start the Ubuntu Docker image in privileged mode: docker run -it --privileged ubuntu:18.04, then the Docker inside of it started just fine.

I am also seeing this issue; but only when I try to do multiple parallel docker builds.