Rtorrent not working

Hello,
I’m using an odroid C2 and flashed the lateste Stretch image.
The first problem I had was that some dietpi functions where missing on /boot/dietpi/func, like dietpi-ramlog, dietpi-banner, and others.
I’ve copied them from github and it started working again.
I’ve then installed rtorrent, Jackett, Emby, Syncthing and UrBackup.
When I try to use rutorrent, it says rtorrent isn’t running, when I go and check rtorrent service status it gives me this log:

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status rtorrent

[FAILED] DietPi-Services | ● rtorrent.service - rTorrent (DietPi)
   Loaded: loaded (/etc/systemd/system/rtorrent.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-05-07 19:11:31 BST; 1min 10s ago
  Process: 950 ExecStop=/usr/bin/screen -S rtorrent -X quit (code=exited, status=1/FAILURE)
  Process: 929 ExecStart=/usr/bin/screen -fa -dmS rtorrent /usr/bin/rtorrent (code=exited, status=0/SUCCESS)
 Main PID: 930 (code=exited, status=0/SUCCESS)

May 07 19:11:30 DietPi systemd[1]: Starting rTorrent (DietPi)...
May 07 19:11:30 DietPi systemd[1]: Started rTorrent (DietPi).
May 07 19:11:31 DietPi screen[950]: No screen session found.
May 07 19:11:31 DietPi systemd[1]: rtorrent.service: Control process exited, code=exited status=1
May 07 19:11:31 DietPi systemd[1]: rtorrent.service: Unit entered failed state.
May 07 19:11:31 DietPi systemd[1]: rtorrent.service: Failed with result 'exit-code'.

As you can see, apparently the problem is that no screen session is found.
Can you guys please help me?

Ps.: I’ve used DietPi on this Odroid for a long time, maybe 3 or 4 years, I’ve never had these issues.

Hi,

many thanks for your report. I tried to replicate your issues and indeed it seems to be related to the new version v6.29.2. I spend quite some time to find our what happen, but did not found a real solution yet.

I noticed that Rtorrent is working if you install it on v6.28 and do the update to v6.29.2 afterwards. Means in general it’s working on v6.29.2. However if you do the update first to v6.29.2 and installing Rtorrent afterwards, the service is not starting due to missing screen.

I tried getting screen up and running but without success. So it depends on the sequence how it is installed. But this doesn’t help you, as you have installed a new image and this will be bumped to latest DietPi release as soon as you start.

As well you are on Debian Stretch. On Buster it would be easier as there we could run Rtorrent in daemon mode and screen would not be needed anymore.

I also spend time to check the versions between Stretch and Buster.

  1. Stretch - 0.9.6-2 - 06 Nov 2015
  2. Buster - 0.9.7-1 - 28 Jun 2018

looking to the release date, I did not expect that someone will add daemon mode to Stretch version.

So only way would be to get screen running or you can try the new Buster image. It still has testing flag but maybe you can give it a try.

https://dietpi.com/downloads/testing/DietPi_OdroidC2-ARMv8-Buster.7z

Maybe MichaIng would have an idea why screen is not working anymore if it will be installed on v6.29.2.

Thanks for your answer, I’ll try buster image again today. I had the same missing dietpi functions problem with it and uninstalled. Will let you know if it works. Thanks

yes the missing files on /boot/dietpi/func are already know. See GitHub https://github.com/MichaIng/DietPi/issues/3509

One thing in addition. It might happen that Rtorrent will fail as well with following error message.

May 08 14:52:46 DietPiVM1 rtorrent[530]: rtorrent: Error in option file: ~/.rtorrent.rc:49: Invalid argument.

but this is quite easy to fix. You could follow this user guide (but might have different settings)

https://dietpi.com/forum/t/fixing-rtorrent-on-latest-dietpi-version-pi4/4073/1

Or you simply going to change DHT mode on /mnt/dietpi_userdata/rtorrent/.rtorrent.rc from dht.mode.set = enabled to dht.mode.set = auto

MichaIng
probably something to adjust on our default config for Buster based systems.

I’ve installed Buster and it all worked, even the functions were there. I had to change dht mode in .rtorrent.rc and had to change network.open_port to yes, but it’s not working yet. ruTorrent complains that the port is closed, I’m looking into it now.

Many thanks for all the help

ok I checked it and for me and it is working fine. Did you correctly forward port 6881 TCP on your router to your DietPi system?

You can follow the tutorial here
https://youtu.be/geV0cMvFHr0

I’ve never had to, rtorrent always worked. But I did and it still not worked. Tomorrow I’m gonna try again

ok let me know how you end up. In my case, it was set to green as soon as I opened the port on my router.

It didn’t work, tried port forwarding, DMZ, edit the .rtorrent like the video. Unfortunately it didn’t work. I’m using a tp-link eifi mesh router and it created a sub network with different ips. I don’t know if this is the problem, woll try connecting odroid directly to ISP modem/router.

It’s not working. I’ve tried everything I know. :cry:

What does the WebUi tells if you move your mouse over the red bubble?

For me it’s like this
picture1.PNG

and once I open the port on my router, it will be set to green (after refresh the status)
picture2.PNG

Exactly the same thing as the first image.

Hey guys, many thanks for reporting and debugging the issue. Indeed there was a bug our side where we set max memory allocation without adding an “M” for MiB, so I guess the effective value is in KiB now which is of course much too low. Fix is up: https://github.com/MichaIng/DietPi/pull/3531
We’ll as well hack this inside v6.30 systems via MOTD, to prevent future users from running into this, until v6.31 release.

Now I am not sure how DHT is related. Probably because it simply requires additional allocated memory. Could you guys try to leave DHT enabled after fixing the max memory string by adding a “M”? Maintaining a “distributed hash table” for trackerless torrents by default makes rTorrent more compatible without the need for user action. Not sure how well “auto” handles it, but of course, if keeping it enabled causes still issues, we’ll revert to “auto”.

I’ve reinstalled everything and tried. I had to change DHT to auto otherwise rtorrent wouldn’t start, giving an invalid argument error.

Ah lol, indeed “enable” is not a valid value, “on” is instead: https://github.com/rakshasa/rtorrent/blob/f37dd0d5c238dc1d7d4739c64680b592dbd5e72f/doc/rtorrent.rc#L99-L104