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 (node1) and (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": "" }'
On node2: etcdctl set /coreos.com/network/config '{ "Network": "" }'
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’

  • Relative path with zip in vrt file (vsizip)?
  • How to use hostname passed as an argument in Dockerfile?
  • Window 10 Docker error during docker run
  • How to mount docker socket as volume in docker container with correct group
  • Gitlab links to “https://gitlab/”
  • No /var/run/docker.sock on OS X
  • Is there any clue on solving this problem?

  • Deleting folders in docker conatiner using python
  • Sequel Pro with Mysql in Docker
  • How to launch a Docker container that i've got from another person?
  • what is the most efficient way to maintain a tagged and latest docker image version
  • Docker mount namespace to share between containers
  • Kubernetes: cant install Dashboard
  • 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.