MarkusMcNugen / docker-qBittorrentvpn

Docker container which runs a headless qBittorrent client with WebUI and optional OpenVPN
https://hub.docker.com/r/markusmcnugen/qbittorrentvpn/
GNU General Public License v3.0
166 stars 92 forks source link

UDP: Operation not permitted (code=1) #130

Open Hugo-Persson opened 2 years ago

Hugo-Persson commented 2 years ago

When I start the container everything starts correctly and I can access the web interface but the log is filled up with this error:

UDP: Operation not permitted (code=1)

Do anyone have a solution for this? I am passing my username and password for the VPN with the environment variables

I am using protonvpn with openvpn

robarmstrong96 commented 2 years ago

Do you have any special characters in your username/password? Might be the cause.

Hugo-Persson commented 2 years ago

No only numbers, capital and lowercase letters

LucaBastelt commented 2 years ago

@Hugo-Persson Have you tried using a TCP openvpn config from protonvpn? Thats what worked for me

wolfdael commented 1 year ago

I am facing the same issue. It initially worked for me and I setup qB. The speed was so bad, so I changed the ovpn files and I started getting this error. Now I have tried TCP and removing docker container and reinstalling as a stack and no method works.

Adding 100 group
groupadd: GID '100' already exists
Adding 998 user
useradd: user 'qbittorent' already exists
2023-02-27 16:16:47.759852 [warn] UMASK not defined (via -e UMASK), defaulting to '002'
2023-02-27 16:16:47.801842 [info] Starting qBittorrent daemon...
Logging to /config/qBittorrent/data/logs/qbittorrent-daemon.log.
start-stop-daemon: matching on world-writable pidfile /var/run/qbittorrent-nox.pid is insecure
2023-02-27 16:16:48.873627 [info] qBittorrent PID: 
Mon Feb 27 16:16:54 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:04 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:14 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:24 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:34 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:44 2023 [node-jp-22.protonvpn.net] Inactivity timeout (--ping-restart), restarting
Mon Feb 27 16:17:44 2023 SIGUSR1[soft,ping-restart] received, process restarting
Mon Feb 27 16:17:44 2023 Restart pause, 5 second(s)
Mon Feb 27 16:17:49 2023 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Feb 27 16:17:49 2023 TCP/UDP: Preserving recently used remote address: [AF_INET]138.199.21.216:51820
Mon Feb 27 16:17:49 2023 Socket Buffers: R=[212992->425984] S=[212992->425984]
Mon Feb 27 16:17:49 2023 NOTE: setsockopt TCP_NODELAY=1 failed
Mon Feb 27 16:17:49 2023 UDP link local: (not bound)
Mon Feb 27 16:17:49 2023 UDP link remote: [AF_INET]138.199.21.216:51820
Mon Feb 27 16:17:49 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:51 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:17:55 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:18:04 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:18:20 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:18:49 2023 [UNDEF] Inactivity timeout (--ping-restart), restarting
Mon Feb 27 16:18:49 2023 SIGUSR1[soft,ping-restart] received, process restarting
Mon Feb 27 16:18:49 2023 Restart pause, 5 second(s)
Mon Feb 27 16:18:54 2023 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Feb 27 16:18:54 2023 TCP/UDP: Preserving recently used remote address: [AF_INET]138.199.21.216:1194
Mon Feb 27 16:18:54 2023 Socket Buffers: R=[212992->425984] S=[212992->425984]
Mon Feb 27 16:18:54 2023 NOTE: setsockopt TCP_NODELAY=1 failed
Mon Feb 27 16:18:54 2023 UDP link local: (not bound)
Mon Feb 27 16:18:54 2023 UDP link remote: [AF_INET]138.199.21.216:1194
Mon Feb 27 16:18:54 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:18:56 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:19:00 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:19:09 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:19:25 2023 write UDP: Operation not permitted (code=1)
Mon Feb 27 16:19:54 2023 [UNDEF] Inactivity timeout (--ping-restart), restarting
Mon Feb 27 16:19:54 2023 SIGUSR1[soft,ping-restart] received, process restarting
Mon Feb 27 16:19:54 2023 Restart pause, 5 second(s)
Mon Feb 27 16:19:59 2023 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Feb 27 16:19:59 2023 TCP/UDP: Preserving recently used remote address: [AF_INET]138.199.21.216:80
Mon Feb 27 16:19:59 2023 Socket Buffers: R=[212992->425984] S=[212992->425984]
Mon Feb 27 16:19:59 2023 NOTE: setsockopt TCP_NODELAY=1 failed
Mon Feb 27 16:19:59 2023 UDP link local: (not bound)
Mon Feb 27 16:19:59 2023 UDP link remote: [AF_INET]138.199.21.216:80
Mon Feb 27 16:19:59 2023 TLS: Initial packet from [AF_INET]138.199.21.216:80, sid=fd8ceef1 74c47f80
Mon Feb 27 16:19:59 2023 VERIFY OK: depth=2, C=CH, O=ProtonVPN AG, CN=ProtonVPN Root CA
Mon Feb 27 16:19:59 2023 VERIFY OK: depth=1, C=CH, O=ProtonVPN AG, CN=ProtonVPN Intermediate CA 1
Mon Feb 27 16:19:59 2023 VERIFY KU OK
Mon Feb 27 16:19:59 2023 Validating certificate extended key usage
Mon Feb 27 16:19:59 2023 ++ Certificate has EKU (str) TLS Web Client Authentication, expects TLS Web Server Authentication
Mon Feb 27 16:19:59 2023 ++ Certificate has EKU (oid) 1.3.6.1.5.5.7.3.2, expects TLS Web Server Authentication
Mon Feb 27 16:19:59 2023 ++ Certificate has EKU (str) 1.3.6.1.5.5.8.2.2, expects TLS Web Server Authentication
Mon Feb 27 16:19:59 2023 ++ Certificate has EKU (oid) 1.3.6.1.5.5.8.2.2, expects TLS Web Server Authentication
Mon Feb 27 16:19:59 2023 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Mon Feb 27 16:19:59 2023 VERIFY EKU OK
Mon Feb 27 16:19:59 2023 VERIFY OK: depth=0, CN=node-jp-22.protonvpn.net
Mon Feb 27 16:19:59 2023 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 4096 bit RSA
Mon Feb 27 16:19:59 2023 [node-jp-22.protonvpn.net] Peer Connection Initiated with [AF_INET]138.199.21.216:80
Mon Feb 27 16:20:00 2023 SENT CONTROL [node-jp-22.protonvpn.net]: 'PUSH_REQUEST' (status=1)
Mon Feb 27 16:20:01 2023 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 10.17.0.1,sndbuf 524288,rcvbuf 524288,redirect-gateway def1,explicit-exit-notify,comp-lzo no,route-gateway 10.17.0.1,topology subnet,ping 10,ping-restart 60,socket-flags TCP_NODELAY,ifconfig 10.17.0.14 255.255.0.0,peer-id 65542,cipher AES-256-GCM'
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: timers and/or timeouts modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: explicit notify parm(s) modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: compression parms modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Mon Feb 27 16:20:01 2023 Socket Buffers: R=[425984->425984] S=[425984->425984]
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: --socket-flags option modified
Mon Feb 27 16:20:01 2023 NOTE: setsockopt TCP_NODELAY=1 failed
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: --ifconfig/up options modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: route options modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: route-related options modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: peer-id set
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: adjusting link_mtu to 1657
Mon Feb 27 16:20:01 2023 OPTIONS IMPORT: data channel crypto options modified
Mon Feb 27 16:20:01 2023 Data Channel: using negotiated cipher 'AES-256-GCM'
Mon Feb 27 16:20:01 2023 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Mon Feb 27 16:20:01 2023 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Mon Feb 27 16:20:01 2023 Preserving previous TUN/TAP instance: tun0
Mon Feb 27 16:20:01 2023 NOTE: Pulled options changed on restart, will need to close and reopen TUN/TAP device.
Mon Feb 27 16:20:01 2023 /sbin/ip route del 138.199.21.216/32
Mon Feb 27 16:20:01 2023 /sbin/ip route del 0.0.0.0/1
Mon Feb 27 16:20:01 2023 /sbin/ip route del 128.0.0.0/1
Mon Feb 27 16:20:01 2023 Closing TUN/TAP interface
Mon Feb 27 16:20:01 2023 /sbin/ip addr del dev tun0 10.17.0.6/16
Mon Feb 27 16:20:01 2023 /etc/openvpn/update-resolv-conf tun0 1500 1585 10.17.0.6 255.255.0.0 init
Mon Feb 27 16:20:02 2023 ROUTE_GATEWAY 172.25.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:19:00:02
Mon Feb 27 16:20:02 2023 TUN/TAP device tun0 opened
Mon Feb 27 16:20:02 2023 TUN/TAP TX queue length set to 100
Mon Feb 27 16:20:02 2023 /sbin/ip link set dev tun0 up mtu 1500
Mon Feb 27 16:20:02 2023 /sbin/ip addr add dev tun0 10.17.0.14/16 broadcast 10.17.255.255
Mon Feb 27 16:20:02 2023 /etc/openvpn/update-resolv-conf tun0 1500 1585 10.17.0.14 255.255.0.0 init
Mon Feb 27 16:20:02 2023 /sbin/ip route add 138.199.21.216/32 via 172.25.0.1
Mon Feb 27 16:20:02 2023 /sbin/ip route add 0.0.0.0/1 via 10.17.0.1
Mon Feb 27 16:20:02 2023 /sbin/ip route add 128.0.0.0/1 via 10.17.0.1
Mon Feb 27 16:20:02 2023 Initialization Sequence Completed

After this nothing happens

Then I ran it the second time,

Adding 100 group
groupadd: GID '100' already exists
Adding 998 user
useradd: user 'qbittorent' already exists
2023-02-27 16:41:38.417859 [warn] UMASK not defined (via -e UMASK), defaulting to '002'
2023-02-27 16:41:38.460821 [info] Starting qBittorrent daemon...
Logging to /config/qBittorrent/data/logs/qbittorrent-daemon.log.
start-stop-daemon: matching on world-writable pidfile /var/run/qbittorrent-nox.pid is insecure
2023-02-27 16:41:39.533716 [info] qBittorrent PID: 

and its stuck here

Dinth commented 1 year ago

How are you generating ovpn file from ProtonVPN? I tried generating an ovpn file on Proton, but getting a gazillion errors when i try to use it (previously i have been successfully using same instance of qbitorrentvpn with mullvad). Also i noticed that it includes authentication certificate, so VPN_USERNAME and VPN_PASSWORD shouldnt be needed at all?