haugene / docker-transmission-openvpn

Docker container running Transmission torrent client with WebUI over an OpenVPN tunnel
GNU General Public License v3.0
4.14k stars 1.21k forks source link

Container Crashing - "Connection Failed - Could not connect to the server. You may need to reload the page to reconnect." #1460

Closed TheBarron0 closed 4 years ago

TheBarron0 commented 4 years ago

Hey

Having continual reboots every few minutes that end with the "Connection Failed - Could not connect to the server. You may need to reload the page to reconnect." message, then needing to refresh the WebUI. Seems to be new to 3.0 as i was having no issues prior.

I have rebuilt the container with a direct pull on 3.0.2 as I wanted to ensure latest version.

PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OPENVPN_USERNAME ***
OPENVPN_PASSWORD ***
OPENVPN_PROVIDER SURFSHARK
GLOBAL_APPLY_PERMISSIONS true
TRANSMISSION_HOME /config
TRANSMISSION_RPC_PORT 9091
TRANSMISSION_DOWNLOAD_DIR /video/Downloads/Torrents/
TRANSMISSION_INCOMPLETE_DIR /video/Downloads/Torrents/InProgress
TRANSMISSION_WATCH_DIR /video/Downloads/Torrents/ToFetch
CREATE_TUN_DEVICE true
ENABLE_UFW false
UFW_ALLOW_GW_NET false
UFW_DISABLE_IPTABLES_REJECT false
PUID 1029
PGID 65538
WEBPROXY_ENABLED false
WEBPROXY_PORT 8888
LOG_TO_STDOUT false
HEALTH_CHECK_HOST google.com
OPENVPN_CONFIG uk-gla_tcp

Log:

< date stream content
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 Initialization Sequence Completed
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 /sbin/ip route add 128.0.0.0/1 via 10.7.7.1
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 /sbin/ip route add 0.0.0.0/1 via 10.7.7.1
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 /sbin/ip route add 185.108.105.174/32 via 172.19.0.1
2020-11-04 21:02:03 stdout Transmission startup script complete.
2020-11-04 21:02:03 stdout STARTING TRANSMISSION
2020-11-04 21:02:03 stdout  
2020-11-04 21:02:03 stdout -------------------------------------
2020-11-04 21:02:03 stdout User gid:    65538
2020-11-04 21:02:03 stdout User uid:    1029
2020-11-04 21:02:03 stdout User name:   abc
2020-11-04 21:02:03 stdout -------------------------------------
2020-11-04 21:02:03 stdout Transmission will run as
2020-11-04 21:02:03 stdout -------------------------------------
2020-11-04 21:02:03 stdout  
2020-11-04 21:02:03 stdout Setting permission for watch directory (775) and its files (664)
2020-11-04 21:02:03 stdout Setting permission for files (644) and directories (755)
2020-11-04 21:02:03 stdout Setting owner for transmission paths to 1029:65538
2020-11-04 21:02:03 stdout Applying permissions to transmission config directories
2020-11-04 21:02:03 stdout Enforcing ownership on transmission config directories
2020-11-04 21:02:03 stdout sed'ing True to true
2020-11-04 21:02:03 stdout Overriding watch-dir because TRANSMISSION_WATCH_DIR is set to /video/Downloads/Torrents/ToFetch
2020-11-04 21:02:03 stdout Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
2020-11-04 21:02:03 stdout Overriding incomplete-dir because TRANSMISSION_INCOMPLETE_DIR is set to /video/Downloads/Torrents/InProgress
2020-11-04 21:02:03 stdout Overriding download-dir because TRANSMISSION_DOWNLOAD_DIR is set to /video/Downloads/Torrents/
2020-11-04 21:02:03 stdout Overriding bind-address-ipv4 because TRANSMISSION_BIND_ADDRESS_IPV4 is set to 10.7.7.2
2020-11-04 21:02:03 stdout Using existing settings.json for Transmission /config/settings.json
2020-11-04 21:02:03 stdout Updating Transmission settings.json with values from env variables
2020-11-04 21:02:03 stdout Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 10.7.7.2
2020-11-04 21:02:03 stdout Up script executed with tun0 1500 1586 10.7.7.2 255.255.255.0 init
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 /etc/openvpn/tunnelUp.sh tun0 1500 1586 10.7.7.2 255.255.255.0 init
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 /sbin/ip addr add dev tun0 10.7.7.2/24 broadcast 10.7.7.255
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 /sbin/ip link set dev tun0 up mtu 1500
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 TUN/TAP TX queue length set to 100
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 TUN/TAP device tun0 opened
2020-11-04 21:02:03 stdout Wed Nov  4 21:02:03 2020 ROUTE_GATEWAY 172.19.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:13:00:04
2020-11-04 21:02:02 stdout Sending kill signal to transmission-daemon
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 /etc/openvpn/tunnelDown.sh tun0 1500 1586 10.7.7.3 255.255.255.0 init
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 /sbin/ip addr del dev tun0 10.7.7.3/24
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 Closing TUN/TAP interface
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 ERROR: Linux route delete command failed: external program exited with error status: 2
2020-11-04 21:02:02 stdout RTNETLINK answers: No such process
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 /sbin/ip route del 128.0.0.0/1
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 ERROR: Linux route delete command failed: external program exited with error status: 2
2020-11-04 21:02:02 stdout RTNETLINK answers: No such process
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 /sbin/ip route del 0.0.0.0/1
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 /sbin/ip route del 185.108.105.176/32
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 NOTE: Pulled options changed on restart, will need to close and reopen TUN/TAP device.
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 Preserving previous TUN/TAP instance: tun0
2020-11-04 21:02:02 stdout Wed Nov  4 21:02:02 2020 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key

Running on Synology NAS

Any help would be appreciated

xoverride commented 4 years ago

Hi, this Connection Failed error is on the GUI, right? After refreshing the GUI web page, does it reconnect ok? Does the transmission itself run ok (Only the GUI is failing)? Does it drop the connection after reconnect? How often this happens? Which GUI are you using?

TheBarron0 commented 4 years ago

The connection failed message comes up on GUI yes, but only after kill signal is sent from the container as per the log above.

The container effectively reboots pausing all forced transfers and resets all connections. Happens anywhere between every 5-10 minutes, to sometimes up to an hour before it does it.

Just Web GUI

xoverride commented 4 years ago

Can you provide a more completed log? The log you currently have seems to start in the middle of openvpn trying to restart, which doesn't have enough information to identify the reason for the restart.

haugene commented 4 years ago

Also worth noting is that the kill-signal is sent because the tunnel is closing. The script is called when OpenVPN is taking it down. So this could have to do with your provider/server as well. Have you tried different servers?