flannel error failed to initialize network failed to open tun device

I’m using flannel for the first time and I’m testing it with two nodes (Ubuntu14.04) with etcd running. The ip addresses of the two nodes are 192.168.0.124 (node1) and 192.168.0.127 (node2), and they can ping each other without problem. I have configured flannel network in etcd as follows:
On node1: etcdctl set /coreos.com/network/config '{ "Network": "10.1.15.0/16" }'
On node2: etcdctl set /coreos.com/network/config '{ "Network": "10.1.20.0/16" }'
However, whenever I run flanneld on either node I get the following error:

E0523 14:11:29.325240 28803 network.go:71] Failed to initialize network (type UDP): Failed to open TUN device: ioctl failed with ‘operation not permitted’

  • Automatic provisioning of Open stack VM for Docker containers
  • ps command doesn't work in docker container
  • install docker on debian - 'overlay' is not supported over overlayfs
  • “Running Kubernetes Locally via Docker” Guide is not working at all for MacOS, ssh command just hanging
  • File not getting updated when using “docker cp”
  • Do pushes to docker hub always increment the “pull” count?
  • Is there any clue on solving this problem?

  • Containerized server application failing to connect to MySQL databases
  • Docker: ECS vs Beanstalk vs Docker Cloud
  • Docker, nginx and several sites on one server
  • Configure Docker container for spring boot micro services
  • delete volumes from images
  • Run command as --privileged in Dockerfile
  • One Solution collect form web for “flannel error failed to initialize network failed to open tun device”

    It turned out to be a permission issue. Simply sudo flanneld will work.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.