Web GUI pops up regularly with "Connection Failed" message on Safari only
Posted: Sun Dec 18, 2016 3:43 am
I recently set up a Raspberry Pi as a home server and installed transmission-daemon on it. I also have my own domain that connects to this server and set up an Apache reverse proxy so that https://torrents.mydoamin.com proxies to transmission. Here are my transmission settings:
Here is my conf file for my Apache reverse proxy:
The problem I'm having is pretty specific and somewhat intermittent which makes it hard to troubleshoot. When I first access the site, it works fine. After a period of inactivity usually between 1-5 minutes, a box pops up that says:
I have tried setting up a CustomLog and ErrorLog in Apache for this conf file but looking through there I don't see any issues that stand out. If I had to take a wild guess, I assume there's some sort of timeout happening because the message doesn't appear when I'm actively using the site, only after a period of inactivity. I'm not sure if there are any other logs I can check or if anyone else has ever seen this issue. Any help would be greatly appreciated. Thanks.
Code: Select all
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/var/lib/transmission-daemon/downloads",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/var/lib/transmission-daemon/Downloads",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 1,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "xxxxxxx",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "username",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}
Code: Select all
<VirtualHost *:443>
ServerName torrents.mydomain.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /etc/letsencrypt/live/webmin.mydomain.com-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/webmin.mydomain.com-0001/privkey.pem
ErrorLog /var/log/apache2/torrents-ssl_error_log
CustomLog /var/log/apache2/torrents-ssl_access_log common
KeepAlive On
ProxyVia On
ProxyRequests Off
ProxyPreserveHost Off
ProxyPass / http://localhost:9091/
ProxyPassReverse / http://localhost:9091/
</VirtualHost>
If I just click on the dismiss button on the box, it goes away and I can still use the site. After doing this, however, it continues to pop up when I am inactive for about 5-10 seconds or so. I can always dismiss it and use the site, but it gets pretty annoying. To further complicate troubleshooting this, it only happens when I access the site through my domain and using the Safari browser on my MacBook or the mobile Safari browser on my iPad. It works fine in Chrome both on my MacBook and on a different Windows PC. It also works on Safari if I access it using the local IP from within my network, i.e. 192.168.1.XXX:9091. The only time this issue happens is using Safari and the Apache reverse proxy.Connection Failed
Could not connect to the server. You may need to reload the page to reconnect.
I have tried setting up a CustomLog and ErrorLog in Apache for this conf file but looking through there I don't see any issues that stand out. If I had to take a wild guess, I assume there's some sort of timeout happening because the message doesn't appear when I'm actively using the site, only after a period of inactivity. I'm not sure if there are any other logs I can check or if anyone else has ever seen this issue. Any help would be greatly appreciated. Thanks.