binhex / arch-rtorrentvpn

Docker build script for Arch Linux base with ruTorrent, rTorrent, autodl-irssi, Privoxy and OpenVPN
GNU General Public License v3.0
238 stars 35 forks source link

rtorrent does not start when changing listening port in rtorrent.rc #183

Closed ethanmlee closed 3 years ago

ethanmlee commented 3 years ago

Anytime I change the listening port in both the rutorrent webui and/or the rtorrent.rc config file and restart the the container or completely remove it and recreate it with the same rtorrent.rc file a i get the following error:

[warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins...

also this is the relevant part of my rtorrent.rc:

# Port range to use for listening.
# below is usually commented out but rtorretn fails to start when uncommented and specify a port/range to listen on
network.port_range.set = 1234-1234
# Start opening ports at a random position within the port range.
#
network.port_random.set = no

I am not using a vpn and I have told docker to expose port 1234 with '1234:1234'. I can only get rtorrent to listen on port 6881 when I comment out 'network.port_range.set'

ethanmlee commented 3 years ago

im an idiot and it works fine.

itsausjjmsc commented 2 years ago

I just wondering how you were an idiot, because I am having this same issue. I change the config file by even 1 line and the whole thing breaks. [warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins... I don't want to use DHT or have the default listening port yes I can't seem to figure out a way to change it. The WEBUI doesn't change anything and the config file keeps it from starting. Please help!

ethanmlee commented 2 years ago

I just wondering how you were an idiot, because I am having this same issue. I change the config file by even 1 line and the whole thing breaks. [warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins... I don't want to use DHT or have the default listening port yes I can't seem to figure out a way to change it. The WEBUI doesn't change anything and the config file keeps it from starting. Please help!

So before you start doing crazy troubleshooting. Make sure your forwarding the port you want to change, and that you have mapped the webui port correctly and are accessing it in your browser correctly. I have done this more times than I care to admit so make sure you know everything else in your container config and how you access it are correct.

Alright so lets dig into the weeds. For me it takes a about 5-10 min to start up the docker container, which makes sense for an arch based docker container that is also starting up a ton of dependencies and programs and resuming upwards of 1000 torrents so that is fine but its important to know so you don't stop it before it has actually started. Also I still get that warning every time I start my container but it works no problem for me, this might be a bug but the app functions perfectly along with all the plugins so i haven't put in a bug report yet.

If waiting longer for it to start and making sure pports are mapped correctly have not solved the issue, then make the chages to your settigns in the webui first, THEN the rtorrent.rc, after that restart the container. idk why I have had to do this on my machine but it will not update my settings and will have issues if I don't first make changes in the UI, then edit the rtorrent.rc to be the exact same thing, and then restart. If restarting the container doesn't work then completely remove the container with either docker-compose down or docker container rm -f container-name and then create it again making sure it is pointing to the sameconfig files. I would wait prob 10-15 min every time you start the container before moving on to make sure it is starting and not just updating the configuration changes.

Here are my startup logs (all the logs between the initial startup text and the nginx startup stuff have been omitted for obvious reasons) with timestamps just so you know how long it takes to start up

2021-10-12T14:57:29.725283633Z 2021-10-12T14:53:03.741677935Z Created by...
2021-10-12T14:53:03.741729040Z ___.   .__       .__                   ,
2021-10-12T14:53:03.741739461Z \_ |__ |__| ____ |  |__   ____ ___  ___,
2021-10-12T14:53:03.741747091Z  | __ \|  |/    \|  |  \_/ __ \\  \/  /,
2021-10-12T14:53:03.741755225Z  | \_\ \  |   |  \   Y  \  ___/ >    < ,
2021-10-12T14:53:03.741763446Z  |___  /__|___|  /___|  /\___  >__/\_ \,
2021-10-12T14:53:03.741771324Z      \/        \/     \/     \/      \/,
2021-10-12T14:53:03.741779024Z    https://hub.docker.com/u/binhex/
2021-10-12T14:53:03.741786391Z 
2021-10-12T14:57:20.800510677Z [info] starting nginx...
2021-10-12T14:57:29.725272597Z [warn] Wait for rTorrent process to start aborted, too many retries
2021-10-12T14:57:29.725278496Z [warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins...

so this time it took 4min 26sec to start and I also got the [warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins... despite the warn, I have no issues with any of the plugins and the webui is still accessible. Hope this helps you get it sorted :)