sgtsquiggs / docker-deluge-openvpn

Docker container which runs Deluge torrent client with WebUI while connecting to OpenVPN. Based on linuxserver/deluge and haugene/transmission-openvpn.
GNU General Public License v3.0
49 stars 23 forks source link

Fresh Container Crashes #11

Open Go2ClassPoorYorick opened 4 years ago

Go2ClassPoorYorick commented 4 years ago

Freshly attempting to use the sgtsquiggs/deluge-openvpn:arm32v7-latest docker container. It appears setup and even connection goes well, until a "non-clean fashion" error appears, which immediately causes the container to crash and restart.

The webUI is available up to this point.

docker run --cap-add=NET_ADMIN --device=/dev/net/tun -d \
              --restart unless-stopped \
              -v /share/CACHEDEV2_DATA/Containers/deluge/config/:/config \
              -v /share/downloads:/downloads \
              -v /etc/localtime:/etc/localtime:ro \
              -e TZ=US/Eastern \
              -e OPENVPN_PROVIDER=IPVANISH \
              -e OPENVPN_CONFIG=ipvanish-US-New-York-nyc-a17,ipvanish-US-Boston-bos-c04,ipvanish-US-New-York-nyc-a11  \
              -e OPENVPN_USERNAME={user} \
              -e OPENVPN_PASSWORD={password}\
              -e LOCAL_NETWORK={localsubnet}/24 \
              -p 8112:8112 \
              sgtsquiggs/deluge-openvpn:arm32v7-latest

-------------------------------------                                                                                                                    
          _         ()                   
         | |  ___   _    __                                                                                                                              
         | | / __| | |  /  \                                                                                                                             
         | | \__ \ | | | () |                                                                                                                            
         |_| |___/ |_|  \__/                                                                                                                             

Brought to you by linuxserver.io                                                                                                                         
We gratefully accept donations at:                                                                                                                       
https://www.linuxserver.io/donate/                                                                                                                       
-------------------------------------                                                                                                                    
GID/UID                                                                                                                                                  
-------------------------------------                                                                                                                    

User uid:    911                                                                                                                                         
User gid:    911                                                                                                                                         
-------------------------------------                                                                                                                    

[cont-init.d] 10-adduser: exited 0.                                                                                                                                                                                                                                                                                        
[cont-init.d] 20-config: executing...                                                                                                                                                                                                                                                                                      
cp: cannot stat '/defaults/settings.sh': No such file or directory                                                                                                                                                                                                                                                         
[cont-init.d] 20-config: exited 1.                                                                                                                                                                                                                                                                                         
[cont-init.d] 30-config: executing...                                                                                                                                                                                                                                                                                      
[cont-init.d] 30-config: exited 0.                                                                                                                                                                                                                                                                                         
[cont-init.d] 99-custom-scripts: executing...                                                                                                                                                                                                                                                                              
[custom-init] no custom files found exiting...                                                                                                                                                                                                                                                                             
[cont-init.d] 99-custom-scripts: exited 0.                                                                                                                                                                                                                                                                                 
[cont-init.d] done.                                                                                                                                                                                                                                                                                                        
[services.d] starting services                                                                                                                                                                                                                                                                                             
[services.d] done.                                                                                                                                                                                                                                                                                                         
Fri Jul 17 18:11:56 2020 [start-openvpn] Using OpenVPN provider: IPVANISH                                                                                                                                                                                                                                                  
Fri Jul 17 18:11:56 2020 [start-openvpn] 3 servers found in OPENVPN_CONFIG, ipvanish-US-Boston-bos-c04 chosen randomly                                                                                                                                                                                                     
Fri Jul 17 18:11:56 2020 [start-openvpn] Starting OpenVPN using config ipvanish-US-Boston-bos-c04.ovpn                                                                                                                                                                                                                     
Fri Jul 17 18:11:56 2020 [start-openvpn] Setting OPENVPN credentials...                                                                                                                                                                                                                                                    
Fri Jul 17 18:11:56 2020 WARNING: --keysize is DEPRECATED and will be removed in OpenVPN 2.6                                                                                                                                                                                                                               
Fri Jul 17 18:11:56 2020 OpenVPN 2.4.4 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019                                                                                                                                                                   
Fri Jul 17 18:11:56 2020 library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.08                                                                                                                                                                                                                                            
Fri Jul 17 18:11:56 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts                                                                                                                                                                                             
Fri Jul 17 18:11:56 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]remote:443                                                                                                                                                                                                                    
Fri Jul 17 18:11:56 2020 Socket Buffers: R=[163840->163840] S=[163840->163840]                                                                                                                                                                                                                                             
Fri Jul 17 18:11:56 2020 UDP link local: (not bound)                                                                                                                                                                                                                                                                       
Fri Jul 17 18:11:56 2020 UDP link remote: [AF_INET]remote:443                                                                                                                                                                                                                                                     
Fri Jul 17 18:11:56 2020 TLS: Initial packet from [AF_INET]remote:443, sid=9888febe ca5ce16c                                                                                                                                                                                                                      
Fri Jul 17 18:11:56 2020 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this                                                                                                                                                                                          
Fri Jul 17 18:11:56 2020 VERIFY OK: depth=1, C=US, ST=FL, L=Winter Park, O=IPVanish, OU=IPVanish VPN, CN=IPVanish CA, emailAddress=support@ipvanish.com                                                                                                                                                                    
Fri Jul 17 18:11:56 2020 VERIFY X509NAME OK: C=US, ST=FL, L=Winter Park, O=IPVanish, OU=IPVanish VPN, CN=bos-c04.ipvanish.com, emailAddress=support@ipvanish.com                                                                                                                                                           
Fri Jul 17 18:11:56 2020 VERIFY OK: depth=0, C=US, ST=FL, L=Winter Park, O=IPVanish, OU=IPVanish VPN, CN=bos-c04.ipvanish.com, emailAddress=support@ipvanish.com                                                                                                                                                           
Fri Jul 17 18:11:56 2020 Control Channel: TLSv1.2, cipher SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA                                                                                                                                                                                                                           
Fri Jul 17 18:11:56 2020 [bos-c04.ipvanish.com] Peer Connection Initiated with [AF_INET]remote:443                                                                                                                                                                                                                
Fri Jul 17 18:11:57 2020 SENT CONTROL [bos-c04.ipvanish.com]: 'PUSH_REQUEST' (status=1)                                                                                                                                                                                                                                    
Fri Jul 17 18:11:58 2020 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 198.18.0.1,dhcp-option DNS 198.18.0.2,rcvbuf 493216,sndbuf 493216,explicit-exit-notify 5,comp-lzo no,route-gateway 172.21.20.1,topology subnet,ping 20,ping-restart 40,ifconfig 172.21.21.93 255.255
.254.0,peer-id 0,cipher AES-256-GCM'                                                                                                                                                                                                                                                                                       
Fri Jul 17 18:11:58 2020 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:6 is ignored by previous <connection> blocks                                                                                                                                                                                                      
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: timers and/or timeouts modified                                                                                                                                                                                                                                                   
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: explicit notify parm(s) modified                                                                                                                                                                                                                                                  
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: compression parms modified                                                                                                                                                                                                                                                        
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified                                                                                                                                                                                                                                                
Fri Jul 17 18:11:58 2020 Socket Buffers: R=[163840->986432] S=[163840->986432]                                                                                                                                                                                                                                             
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: --ifconfig/up options modified                                                                                                                                                                                                                                                    
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: route options modified                                                                                                                                                                                                                                                            
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: route-related options modified
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified                                                                                                                                                                                                                                  
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: peer-id set                                                                                                                                                                                                                                                                       
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: adjusting link_mtu to 1625                                                                                                                                                                                                                                                        
Fri Jul 17 18:11:58 2020 OPTIONS IMPORT: data channel crypto options modified                                                                                                                                                                                                                                              
Fri Jul 17 18:11:58 2020 Data Channel: using negotiated cipher 'AES-256-GCM'                                                                                                                                                                                                                                               
Fri Jul 17 18:11:58 2020 NCP: overriding user-set keysize with default                                                                                                                                                                                                                                                     
Fri Jul 17 18:11:58 2020 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key                                                                                                                                                                                                                          
Fri Jul 17 18:11:58 2020 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key                                                                                                                                                                                                                          
Fri Jul 17 18:11:58 2020 ROUTE_GATEWAY 10.0.3.1/255.255.255.0 IFACE=eth0 HWADDR=02:42:0a:00:03:02                                                                                                                                                                                                                          
Fri Jul 17 18:11:58 2020 TUN/TAP device tun0 opened                                                                                                                                                                                                                                                                        
Fri Jul 17 18:11:58 2020 TUN/TAP TX queue length set to 100                                                                                                                                                                                                                                                                
Fri Jul 17 18:11:58 2020 do_ifconfig, tt->did_ifconfig_ipv6_setup=0                                                                                                                                                                                                                                                        
Fri Jul 17 18:11:58 2020 /sbin/ip link set dev tun0 up mtu 1500                                                                                                                                                                                                                                                            
Fri Jul 17 18:11:58 2020 /sbin/ip addr add dev tun0 172.21.21.93/23 broadcast 172.21.21.255                                                                                                                                                                                                                                
Fri Jul 17 18:11:58 2020 /etc/openvpn/tunnelUp.sh tun0 1500 1553 172.21.21.93 255.255.254.0 init                                                                                                                                                                                                                           
Fri Jul 17 18:11:58 2020 [tunnel-up] Up script executed with tun0 1500 1553 172.21.21.93 255.255.254.0 init                                                                                                                                                                                                                
Fri Jul 17 18:11:58 2020 [tunnel-up] Using ip of interface tun0: 172.21.21.93                                                                                                                                                                                                                                              
Fri Jul 17 18:11:58 2020 [tunnel-up] Updating Deluge conf file: listen_interface=172.21.21.93                                                                                                                                                                                                                              
Fri Jul 17 18:11:58 2020 [tunnel-up] Starting Deluge                                                                                                                                                                                                                                                                       
Fri Jul 17 18:11:58 2020 [tunnel-up] Setting Deluge listen_interface                                                                                                                                                                                                                                                       
18:11:58 [WARNING ][deluge.i18n.util           :83  ] IOError when loading translations: [Errno 2] No translation file found for domain: 'deluge'                                                                                                                                                                          
18:11:58 [INFO    ][deluge.configmanager:52  ] Setting config directory to: /config                                                                                                                                                                                                                                        
18:11:59 [INFO    ][deluge.core.daemon            :94  ] Deluge daemon 2.0.3-2-201906121747-ubuntu18.04.1                                                                                                                                                                                                                  
18:11:59 [INFO    ][deluge.core.core              :339 ] Successfully loaded session.state: /config/session.state                                                                                                                                                                                                          
18:11:59 [INFO    ][deluge.core.core              :339 ] Successfully loaded session.state: /config/session.state.bak                                                                                                                                                                                                      
18:11:59 [INFO    ][deluge.core.alertmanager      :148 ] Alert Queue Size set to 10000                                                                                                                                                                                                                                     
18:11:59 [INFO    ][deluge.core.rpcserver         :402 ] Starting DelugeRPC server localhost:58846                                                                                                                                                                                                                         
18:11:59 [INFO    ][twisted                       :154 ] Factory (TLS) starting on 58846                                                                                                                                                                                                                                   
18:11:59 [INFO    ][twisted                       :154 ] Starting factory <twisted.internet.protocol.Factory object at 0x7398eab0>                                                                                                                                                                                         
18:11:59 [INFO    ][deluge.core.daemon            :154 ] Deluge daemon starting...                                                                                                                                                                                                                                         
18:11:59 [INFO    ][deluge.core.authmanager       :228 ] Opening auth for load: /config/auth                                                                                                                                                                                                                               
18:11:59 [INFO    ][deluge.core.authmanager       :236 ] Successfully loaded auth: /config/auth                                                                                                                                                                                                                            
18:11:59 [INFO    ][deluge.core.torrentmanager    :806 ] Loading torrent state: /config/state/torrents.state                                                                                                                                                                                                               
18:11:59 [INFO    ][deluge.core.torrentmanager    :819 ] Successfully loaded /config/state/torrents.state                                                                                                                                                                                                                  
18:11:59 [INFO    ][deluge.core.torrentmanager    :1066] Opening torrents.fastresume for load: /config/state/torrents.fastresume                                                                                                                                                                                           
18:11:59 [INFO    ][deluge.core.torrentmanager    :1066] Opening torrents.fastresume for load: /config/state/torrents.fastresume.bak                                                                                                                                                                                       
18:11:59 [INFO    ][deluge.core.torrentmanager    :1066] Opening torrents.fastresume for load: /config/torrents.fastresume                                                                                                                                                                                                 
18:11:59 [INFO    ][deluge.core.torrentmanager    :885 ] Finished loading 0 torrents in 0:00:00.002795                                                                                                                                                                                                                     
18:12:11 [INFO    ][deluge.core.rpcserver         :171 ] Deluge Client connection made from: 127.0.0.1:60096                                                                                                                                                                                                               
Setting "listen_interface" to: 172.21.21.93                                                                                                                                                                                                                                                                                
Configuration value successfully updated.                                                                                                                                                                                                                                                                                  
18:12:11 [INFO    ][deluge.core.rpcserver         :197 ] Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection lost.                                                                                
Fri Jul 17 18:12:11 2020 [tunnel-up] Adding route to local network local/24 via 10.0.3.1 dev eth0                                                 
Fri Jul 17 18:12:11 2020 [tunnel-up] No port updated for this provider!                                                                                  
Fri Jul 17 18:12:11 2020 [tunnel-up] Deluge startup script complete.                                                                                     
Fri Jul 17 18:12:11 2020 /sbin/ip route add remote/32 via 10.0.3.1                                                                              
Fri Jul 17 18:12:11 2020 /sbin/ip route add 0.0.0.0/1 via 172.21.20.1                                                                                    
Fri Jul 17 18:12:11 2020 /sbin/ip route add 128.0.0.0/1 via 172.21.20.1                                                                                  
Fri Jul 17 18:12:11 2020 Initialization Sequence Completed                                                                                               
18:12:14 [INFO    ][deluge.core.torrentmanager    :1609] on_alert_external_ip: 198.181.163.151                                                           
Fri Jul 17 18:12:22 2020 event_wait : Interrupted system call (code=4)                                                                                   
Fri Jul 17 18:12:22 2020 SIGTERM received, sending exit notification to peer                                                                             
[cont-finish.d] executing container finish scripts...                                                                                                    
[cont-finish.d] done.                                                                                                                                    
[s6-finish] waiting for services.                                                                                                                        
s6-svwait: fatal: supervisor died                                                                                                                        
[s6-finish] sending all processes the TERM signal.```
Go2ClassPoorYorick commented 4 years ago

Please mark this as closed. QNAP NAS's have a daemon that searches open processes for "openvpn" and automatically kills them. Very silly.

Fix for this specific issue detailed below. https://www.reddit.com/r/qnap/comments/e2nmxl/guide_torrent_downloading_behind_vpn_using/