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’

  • windows docker on vmwarevsphere
  • Bcrypt: invalid ELF header with Docker and Sails.JS
  • How can I see Dockerfile for each docker image?
  • Create docker image to run selenium tests on different browser versions
  • docker, csgo server, lgsm, server never start
  • RunContainer: Error response from daemon: Duplicate mount point (Kubernetes)
  • Is there any clue on solving this problem?

  • Docker CentOS image does not auto start httpd
  • Access Docker socket within container
  • Nginx in Docker container won't run PHP
  • How to restore docker images which are removed by `docker rmi` command?
  • How to find out how much RAM a docker run execution consumed at maximum?
  • Dependency cannot see its config during compilation
  • 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.