gluetun: Bug: cannot create TUN device file node: file exists
Is this urgent?
No
Host OS
Arch Linux x86_64
CPU arch
x86_64
VPN service provider
PrivateVPN
What are you using to run the container
docker run
What is the version of Gluetun
Running version latest built on 2022-03-09T21:14:11.771Z (commit 0795008)
Whatβs the problem π€
2022/03/10 11:59:09 ERROR cannot create TUN device file node: file exists
Share your logs
========================================
========================================
=============== gluetun ================
========================================
=========== Made with β€οΈ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version latest built on 2022-03-09T21:14:11.771Z (commit 0795008)
π§ Need help? https://github.com/qdm12/gluetun/discussions/new
π Bug? https://github.com/qdm12/gluetun/issues/new
β¨ New feature? https://github.com/qdm12/gluetun/issues/new
β Discussion? https://github.com/qdm12/gluetun/discussions/new
π» Email? quentin.mcgaw@gmail.com
π° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2022/03/10 12:06:37 INFO routing: default route found: interface eth0, gateway 172.17.0.1
2022/03/10 12:06:37 INFO routing: local ethernet link found: eth0
2022/03/10 12:06:37 INFO routing: local ipnet found: 172.17.0.0/16
2022/03/10 12:06:37 INFO firewall: enabling...
2022/03/10 12:06:37 DEBUG firewall: iptables --policy INPUT DROP
2022/03/10 12:06:37 DEBUG firewall: iptables --policy OUTPUT DROP
2022/03/10 12:06:37 DEBUG firewall: iptables --policy FORWARD DROP
2022/03/10 12:06:37 DEBUG firewall: iptables --append INPUT -i lo -j ACCEPT
2022/03/10 12:06:37 DEBUG firewall: iptables --append OUTPUT -o lo -j ACCEPT
2022/03/10 12:06:37 DEBUG firewall: iptables --append OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
2022/03/10 12:06:37 DEBUG firewall: iptables --append INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
2022/03/10 12:06:37 DEBUG firewall: iptables --append OUTPUT -o eth0 -s 172.17.0.5 -d 172.17.0.0/16 -j ACCEPT
2022/03/10 12:06:37 DEBUG firewall: iptables --append INPUT -i eth0 -d 172.17.0.0/16 -j ACCEPT
2022/03/10 12:06:37 INFO firewall: enabled successfully
2022/03/10 12:06:37 INFO storage: creating /gluetun/servers.json with 11096 hardcoded servers
2022/03/10 12:06:37 INFO Alpine version: 3.15.0
2022/03/10 12:06:37 INFO OpenVPN 2.4 version: 2.4.11
2022/03/10 12:06:37 INFO OpenVPN 2.5 version: 2.5.4
2022/03/10 12:06:37 INFO Unbound version: 1.13.2
2022/03/10 12:06:37 INFO IPtables version: v1.8.7
2022/03/10 12:06:37 INFO Settings summary:
βββ VPN settings:
| βββ VPN provider settings:
| | βββ Name: perfect privacy
| | βββ Server selection settings:
| | βββ VPN type: openvpn
| | βββ Cities: amsterdam
| | βββ OpenVPN server selection settings:
| | βββ Protocol: UDP
| βββ OpenVPN settings:
| βββ OpenVPN version: 2.5
| βββ User: [set]
| βββ Password: [set]
| βββ Tunnel IPv6: no
| βββ Network interface: tun0
| βββ Run OpenVPN as: root
| βββ Verbosity level: 1
βββ DNS settings:
| βββ DNS server address to use: 127.0.0.1
| βββ Keep existing nameserver(s): no
| βββ DNS over TLS settings:
| βββ Enabled: yes
| βββ Update period: every 24h0m0s
| βββ Unbound settings:
| | βββ Authoritative servers:
| | | βββ cloudflare
| | βββ Caching: yes
| | βββ IPv6: no
| | βββ Verbosity level: 1
| | βββ Verbosity details level: 0
| | βββ Validation log level: 0
| | βββ System user: root
| | βββ Allowed networks:
| | βββ 0.0.0.0/0
| | βββ ::/0
| βββ DNS filtering settings:
| βββ Block malicious: yes
| βββ Block ads: no
| βββ Block surveillance: no
| βββ Blocked IP networks:
| βββ 127.0.0.1/8
| βββ 10.0.0.0/8
| βββ 172.16.0.0/12
| βββ 192.168.0.0/16
| βββ 169.254.0.0/16
| βββ ::1/128
| βββ fc00::/7
| βββ fe80::/10
| βββ ::ffff:7f00:1/104
| βββ ::ffff:a00:0/104
| βββ ::ffff:a9fe:0/112
| βββ ::ffff:ac10:0/108
| βββ ::ffff:c0a8:0/112
βββ Firewall settings:
| βββ Enabled: yes
βββ Log settings:
| βββ Log level: DEBUG
βββ Health settings:
| βββ Server listening address: 127.0.0.1:9999
| βββ Address to ping: github.com
| βββ VPN wait durations:
| βββ Initial duration: 5s
| βββ Additional duration: 5s
βββ Shadowsocks server settings:
| βββ Enabled: no
βββ HTTP proxy settings:
| βββ Enabled: no
βββ Control server settings:
| βββ Listening address: :8000
| βββ Logging: yes
βββ OS Alpine settings:
| βββ Process UID: 1000
| βββ Process GID: 1000
βββ Public IP settings:
| βββ Fetching: every 12h0m0s
| βββ IP file path: /tmp/gluetun/ip
βββ Version settings:
βββ Enabled: yes
2022/03/10 12:06:37 INFO routing: default route found: interface eth0, gateway 172.17.0.1
2022/03/10 12:06:37 DEBUG routing: ip rule add from 172.17.0.5/32 lookup 200 pref 100
2022/03/10 12:06:37 INFO routing: adding route for 0.0.0.0/0
2022/03/10 12:06:37 DEBUG routing: ip route replace 0.0.0.0/0 via 172.17.0.1 dev eth0 table 200
2022/03/10 12:06:37 INFO firewall: setting allowed subnets...
2022/03/10 12:06:37 INFO routing: default route found: interface eth0, gateway 172.17.0.1
2022/03/10 12:06:37 INFO TUN device is not available: open /dev/net/tun: no such device; creating it...
2022/03/10 12:06:37 INFO routing cleanup...
2022/03/10 12:06:37 INFO routing: default route found: interface eth0, gateway 172.17.0.1
2022/03/10 12:06:37 INFO routing: deleting route for 0.0.0.0/0
2022/03/10 12:06:37 DEBUG routing: ip route delete 0.0.0.0/0 via 172.17.0.1 dev eth0 table 200
2022/03/10 12:06:37 DEBUG routing: ip rule del from 172.17.0.5/32 lookup 200 pref 100
2022/03/10 12:06:37 ERROR cannot create TUN device file node: file exists
2022/03/10 12:06:37 INFO Shutdown successful
Share your configuration
docker run -it --device /dev/net/tun --rm --cap-add=NET_ADMIN -e LOG_LEVEL=debug -e VPN_SERVICE_PROVIDER="perfect privacy" -e OPENVPN_USER=USERNAME -e OPENVPN_PASSWORD=PASSWORD -e SERVER_CITIES=Amsterdam qmcgaw/gluetun
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Remove
--device /dev/net/tun
for now. Iβll fix it ASAP πFor anyone else having the same issue In a docker compose file, pass the ENV variables as: β- PGID=0 -PUID=0β so the container runs as root.