DyonR / docker-Jackettvpn

Docker container which runs a headless Jackett Server with an optional WireGuard or OpenVPN connection
https://hub.docker.com/r/dyonr/jackettvpn/
GNU General Public License v3.0
70 stars 31 forks source link

Different seemingly fatal error. #38

Closed goldenpipes closed 3 years ago

goldenpipes commented 3 years ago

using Nord VPN, it was working fine for a long time, not really sure what changed, docker pulled a newer build or something and the last day or two I get this error.

2020-12-15 00:25:26.494960 [INFO] VPN_ENABLED defined as 'yes'
2020-12-15 00:25:26.536815 [INFO] DISABLE_IPV6 is set to ''
2020-12-15 00:25:26.594441 [INFO] Disabling IPv6 in sysctl
2020-12-15 00:25:26.647568 [WARNING] VPN_TYPE not set, defaulting to OpenVPN.
2020-12-15 00:25:26.716904 [WARNING] Unable to chown/chmod /config/openvpn/, assuming SMB mountpoint
2020-12-15 00:25:26.770047 [INFO] OpenVPN config file is found at /config/openvpn/us6310.nordvpn.com.udp.ovpn
dos2unix: converting file /config/openvpn/us6310.nordvpn.com.udp.ovpn to Unix format...
2020-12-15 00:25:26.854502 [INFO] VPN remote line defined as '172.93.177.139 1194'
2020-12-15 00:25:26.900652 [INFO] VPN_REMOTE defined as '172.93.177.139'
2020-12-15 00:25:26.950508 [INFO] VPN_PORT defined as '1194'
2020-12-15 00:25:27.014707 [INFO] VPN_PROTOCOL defined as 'udp'
2020-12-15 00:25:27.062003 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2020-12-15 00:25:27.105119 [INFO] LAN_NETWORK defined as '10.0.0.0/24'
2020-12-15 00:25:27.137214 [INFO] NAME_SERVERS defined as '1.1.1.1,1.0.0.1'
2020-12-15 00:25:27.173446 [INFO] VPN_OPTIONS not defined (via -e VPN_OPTIONS)
2020-12-15 00:25:27.209324 [INFO] Adding 1.1.1.1 to resolv.conf
2020-12-15 00:25:27.246428 [INFO] Adding 1.0.0.1 to resolv.conf
2020-12-15 00:25:27.284047 [INFO] PGID not defined. Defaulting to root group
2020-12-15 00:25:27.324068 [INFO] Starting OpenVPN...
Tue Dec 15 00:25:27 2020 OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Tue Dec 15 00:25:27 2020 library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.08
Tue Dec 15 00:25:27 2020 neither stdin nor stderr are a tty device and you have neither a controlling tty nor systemd - can't ask for 'Enter Auth Username:'.  If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache.
Tue Dec 15 00:25:27 2020 Exiting due to fatal error

Thanks in advance.

DyonR commented 3 years ago

I've never seen this error before.
What system are you running?
What is the Docker Run command that you use WITH YOUR USERNAME/PASSWORD REMOVED.
Also, please share your .ovpn file. Make sure to censor any private info, remove the certificate and keys Example:

client
dev tun
proto udp
remote my.vpnprovider.com 443

nobind
auth-user-pass

resolv-retry infinite

auth SHA512
cipher AES-256-CBC
comp-lzo
verb 2
mute-replay-warnings
remote-cert-tls server
persist-key
persist-tun

key-direction 1
goldenpipes commented 3 years ago

I'm on windows 10 with docker for windows on WSL2,

using nordvpn UDP openvpn.

not really sure on what im doing,

I just downloaded the openvpn config and put it in the folder and it ran great for many months, i did a docker update, and it pulled a new build of the container, and it broke something.

my docker compose is:

jackettvpn:
    image: 'dyonr/jackettvpn:latest'
    volumes:
      - '.\jackett:/config'
      - '.\jackett\blackhole:/blackhole'
    ports:
      - '9117:9117'
    environment:
      - TZ=America/Chicago
      - VPN_ENABLED=YES
      - LAN_NETWORK=10.0.0.0/24
      - 'NAME_SERVERS=1.1.1.1,1.0.0.1'
      - PUID=99
      - GUID=100
      - WEBUI_PORT=9117

ovpn:

client
dev tun
proto udp
remote 172.93.177.139 1194
resolv-retry infinite
remote-random
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-rem
reneg-sec 0
comp-lzo no

remote-cert-tls server

auth-user-pass
verb 3
pull
fast-io
cipher AES-256-CBC
auth SHA512
<ca>
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
</ca>
key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----

-----END OpenVPN Static key V1-----
</tls-auth>
goldenpipes commented 3 years ago

ok so im getting a different error now:

2021-01-09 18:44:52.581666 [INFO] VPN_ENABLED defined as 'yes'
2021-01-09 18:44:52.616809 [INFO] DISABLE_IPV6 is set to ''
2021-01-09 18:44:52.647482 [INFO] Disabling IPv6 in sysctl
2021-01-09 18:44:52.681177 [WARNING] VPN_TYPE not set, defaulting to OpenVPN.
2021-01-09 18:44:52.725559 [WARNING] Unable to chown/chmod /config/openvpn/, assuming SMB mountpoint
2021-01-09 18:44:52.761839 [INFO] OpenVPN config file is found at /config/openvpn/us6310.nordvpn.com.udp.ovpn
dos2unix: converting file /config/openvpn/us6310.nordvpn.com.udp.ovpn to Unix format...
2021-01-09 18:44:52.814334 [INFO] VPN remote line defined as '172.93.177.139 1194'
2021-01-09 18:44:52.841668 [INFO] VPN_REMOTE defined as '172.93.177.139'
2021-01-09 18:44:52.874036 [INFO] VPN_PORT defined as '1194'
2021-01-09 18:44:52.906581 [INFO] VPN_PROTOCOL defined as 'udp'
2021-01-09 18:44:52.934569 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2021-01-09 18:44:52.962769 [INFO] LAN_NETWORK defined as '10.0.0.0/24'
2021-01-09 18:44:52.995608 [INFO] NAME_SERVERS defined as '1.1.1.1,1.0.0.1'
2021-01-09 18:44:53.023089 [INFO] VPN_OPTIONS not defined (via -e VPN_OPTIONS)
2021-01-09 18:44:53.058223 [INFO] Adding 1.1.1.1 to resolv.conf
2021-01-09 18:44:53.084357 [INFO] Adding 1.0.0.1 to resolv.conf
2021-01-09 18:44:53.112064 [INFO] PGID not defined. Defaulting to root group
2021-01-09 18:44:53.147030 [INFO] Starting OpenVPN...
Sat Jan  9 18:44:53 2021 WARNING: file 'credentials.conf' is group or others accessible
Sat Jan  9 18:44:53 2021 OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Sat Jan  9 18:44:53 2021 library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.08
Sat Jan  9 18:44:53 2021 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sat Jan  9 18:44:53 2021 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Jan  9 18:44:53 2021 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Jan  9 18:44:53 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]172.93.177.139:1194
Sat Jan  9 18:44:53 2021 Socket Buffers: R=[212992->212992] S=[212992->212992]
Sat Jan  9 18:44:53 2021 UDP link local: (not bound)
Sat Jan  9 18:44:53 2021 UDP link remote: [AF_INET]172.93.177.139:1194
Sat Jan  9 18:44:53 2021 TLS: Initial packet from [AF_INET]172.93.177.139:1194, sid=efc9692c c02ba987
Sat Jan  9 18:44:53 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sat Jan  9 18:44:53 2021 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA
Sat Jan  9 18:44:53 2021 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA5
Sat Jan  9 18:44:53 2021 VERIFY KU OK
Sat Jan  9 18:44:53 2021 Validating certificate extended key usage
Sat Jan  9 18:44:53 2021 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Jan  9 18:44:53 2021 VERIFY EKU OK
Sat Jan  9 18:44:53 2021 VERIFY OK: depth=0, CN=us6310.nordvpn.com
Sat Jan  9 18:44:53 2021 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 4096 bit RSA
Sat Jan  9 18:44:53 2021 [us6310.nordvpn.com] Peer Connection Initiated with [AF_INET]172.93.177.139:1194
Sat Jan  9 18:44:54 2021 SENT CONTROL [us6310.nordvpn.com]: 'PUSH_REQUEST' (status=1)
Sat Jan  9 18:44:54 2021 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.8.1.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.8.1.5 255.255.255.0,peer-id 1,cipher AES-256-GCM'
Sat Jan  9 18:44:54 2021 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:6 is ignored by previous <connection> blocks 
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: timers and/or timeouts modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: explicit notify parm(s) modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: compression parms modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Sat Jan  9 18:44:54 2021 Socket Buffers: R=[212992->425984] S=[212992->425984]
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: --ifconfig/up options modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: route options modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: route-related options modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: peer-id set
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: adjusting link_mtu to 1657
Sat Jan  9 18:44:54 2021 OPTIONS IMPORT: data channel crypto options modified
Sat Jan  9 18:44:54 2021 Data Channel: using negotiated cipher 'AES-256-GCM'
Sat Jan  9 18:44:54 2021 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Jan  9 18:44:54 2021 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Jan  9 18:44:54 2021 ROUTE_GATEWAY 172.18.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:12:00:06
Sat Jan  9 18:44:54 2021 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Sat Jan  9 18:44:54 2021 Exiting due to fatal error
DyonR commented 3 years ago

Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2) is often caused by running the container without privileged mode. Can you check you are running it privileged?

goldenpipes commented 3 years ago

sure let me check

Edit:

adding privileged mode to my docker compose seems to have fixed it! Thank you so much!