-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web proxy stops working after period of time #2489
Comments
I had a similar problem though, a container restart would fix the problem.
|
Having the same problem! |
Thanks. Anyway I'll run the modded container along-side the standard container for a while and update what happens. |
http://p.p will give you the listening port and address if privoxy is listening on the proper eth0 ip. PR #2494 was proposed as a fix for this issue. |
I believe I'm having the same issue. Just to be clear, I'm not able to access the web UI after the container runs for about 2 days. There are no error messages in the logs. Restarting the container resolves the issue for 2 more days. The error I get in my browser is "connection reset". This problem started happening after I updated the container image I was using a few months ago. |
as I understood it, docker sometime change container's ip. This was not a problem when transmission was listening to all interfaces ( ethX and tun ) : see default settings.
This could be seen as a problem as you expose your transmission instance to all your vpn's customers. redefining listening ip to ethX's ip is the solution to be sure you are the only one to access your instance. Hence the connection issue when docker changes container's ip. the listening ip is set when openvpn is launching transmission docker-transmission-openvpn/transmission/start.sh Lines 28 to 33 in fc003b0
At the moment, as transmission is spawned by openvpn, i'm not sure transmission could be restarted to listen to the new ip. PR #2494 was a commit to restart privoxy when ip changed. Next time, "connection reset" is displayed, you may check transmission listening address ( set in settings.json ) and eth0'ip (ip -4 a) |
an easier, may be better, also simplier would be to add an health check to compare actual eth0's ip and transmission ip, whenever there is a difference healthcheck fails and/or a signal is sent to openvpn to kill the connection. an alternative would be to kill and restart transmission: |
@edgd1er Thank you for your reply. Please excuse my ignorance but I want to ask you a question regarding your response.
My understanding from your reply is that if I have "bind-address-ipv4" set to 0.0.0.0 then I shouldn't be experiencing the issue? Because in my case, bind-address-ipv4 is set to 0.0.0.0..... in the environment-variables.sh however, I see that TRANSMISSION_BIND_ADDRESS_IPV4 is set to a specific singular IP. |
if environment-variables.sh has the variable TRANSMISSION_BIND_ADDRESS_IPV4 set, you should be good. |
I see. In my settings.json the bind-address-ipv4 isn't 0.0.0.0 it's a different address which I guess must be the issue. I wonder where it's getting overwritten... |
I'm sure I understand what you are trying to achieve. At each start settings.json is created from default-settings.json and environment variables.
except BIND_ADDRESS that is set here with current eth0 address.
You could change/modify that script to have whatever you wish to be done. but we are not discussing about the issue's subject: proxy. |
Understood. Thank you. I might try the dev build since it looks like PR 2494 was merged in 2 weeks ago and that appears to address the issue. |
I was having similar issues with proxy not working, restarting the container did not solve the issue. It looked to me like wrong IP was overridden into that env var, but I can't be sure. I can confirm that |
This worked for me:
I ran tests using |
I just went the lazy route and used a scheduled task to restart the container every 24 hours. |
I'm curious, I am having a similar problem with an port forwarding. When I start the container, the port is open, but after an indeterminate amount of time, the port closes. The first time I ran the container it took several hours, now it is just taking minutes |
I couldn't even get that to work.
I know it doesn't answer this issue but I eventually gave up and followed this tutorial for an alternate route https://drfrankenstein.co.uk/2022/09/26/qbittorrent-with-gluetun-vpn-in-docker-on-a-synology-nas/ |
I used python and make a request to localhost on the port that transmission is exposed on. If anything besides a 200 comes back I use subprocess to restart the container. |
I'm having the same issue. Transmission runs for 2-3 days then will not connect to trackers. I also tried the latest and dev versions with no improvement. Any help would be greatly appreciated! See below for my setup. I do see an error in transmission: Also, I noticed in the settings.json file there are two bind address entries: "bind-address-ipv4": "xxx.xxx.xxx.xxx", Notice that rpc-bind-address has the 0.0.0.0 value, but bind-address-ip4 still has a single IP address assigned (I'm assuming that's the VPN provider external IP. System: Synology DSM version 7.1.1-42962 Docker run command: docker run --cap-add=NET_ADMIN -d |
I think there is a mistake in the script when comparing with the address in /etc/privoxy/config. This file also includes the port which causes privoxy to restart every minute. You now see the this error message in docker inspect:
I am not an grep expert but I believe this part of the script needs to be adjusted to extract the ip only, not the port number. |
Here a regex to filter out port, i have no computer to test it though. (?<=^listen-address)[^:]+ |
Where would you put this in the script? Is there a specific line that this should be added to? Thanks! |
Already added in dev branch: docker-transmission-openvpn/scripts/healthcheck.sh Lines 58 to 69 in 2bd89d7
|
Fixed in dev branch |
I think the actual fix to strip the port number from post #2489 (comment) is not in this code snippet. I also do not see the strip port code include in the dev branch. |
Right, my bad.. once a PR with the port strip regexp is added we can close this |
I am not at home now but end of next week I will create a PR for this. |
I tried running with the modification but unfortunately it does not help. The problem surfaces when there is an update of docker on my Debian repository. When I update docker, the web proxy goes offline. What I noticed is that the proxy does not restart and keeps stating the ip address is not identical. Something else must be going on here. |
Hello,
|
Sweet. Thank you! |
Thanks for this. Has resolved the issue for me. |
the sed should not be needed as set_port in privoxy start's script is changing the ip and port. a /g may be added to the sed command if you have several listen-address lines. though unlikely to occur as container is supposed to have only one eth interface. docker-transmission-openvpn/privoxy/scripts/start.sh Lines 27 to 34 in 42eb2ee
|
I created a merge request to change the regular expression in the |
I created a pull request (#2678) with a mix of various proposed changes. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Is there a pinned issue for this?
Is there an existing or similar issue/discussion for this?
Is there any comment in the documentation for this?
Is this related to a provider?
Are you using the latest release?
Have you tried using the dev branch latest?
Docker run config used
docker run
--name transmission
--privileged
--label=com.centurylinklabs.watchtower.monitor-only=true
--restart unless-stopped
-v /volume1/Media/:/Media
-e TRANSMISSION_DOWNLOAD_DIR=/Media/Downloads/Torrents/Movies
-e TRANSMISSION_INCOMPLETE_DIR=/Media/Downloads/Torrents/Incomplete
-e TRANSMISSION_WATCH_DIR=/Media/Downloads/Torrents/ToFetch
-v /volume1/docker/Transmission/:/config
-e OPENVPN_PROVIDER=EXPRESSVPN
-e OPENVPN_CONFIG=my_expressvpn_uk_-_docklands_udp
-e OPENVPN_USERNAME=*
-e OPENVPN_PASSWORD=*
-e PUID=*
-e PGID=*
-e LOCAL_NETWORK=192.168.0.0/24
-e TZ=*
-e TRANSMISSION_WEB_UI=flood-for-transmission
-e WEBPROXY_ENABLED=true
--log-driver json-file
--log-opt max-size=10m
-p 27800:9091
-p 8888:8118
haugene/transmission-openvpn:4.2
Current Behavior
The web proxy works for routing traffic for a varying period of time after creating and starting the container. After a period of time (usually a few days) the web proxy no longer works despite the VPN still being active and downloads possible. Restarting the container does not fix the issue. Deleting and creating the container again with the same docker-run works for a few days.
Expected Behavior
Web proxy should continue as long as VPN is active
How have you tried to solve the problem?
Tried v4.3.
Tried with various configs from the same VPN provider.
Tried fresh install with new config files.
Log output
settings.json.txt
HW/SW Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: