rTorrent stopped working (cubox)
Home › Forums › GeeXboX on ARM SoCs › rTorrent stopped working (cubox)
This topic contains 18 replies, has 5 voices, and was last updated by nirfun 1 month, 2 weeks ago.
-
AuthorPosts
-
April 23, 2016 at 13:45 #10447
Hi,
First of all, I must say that geexbox is far better than openELEC, don’t know if this makes any sense but this is my experience with these two.
I was using rTorrent on my cubox with geexbox and suddenly I get an error from ruTorrent:
“torrent list not yet available connection to rtorrent not established”Tried to remove the lock file in session folder but it didn’t help.
any ideas?thanks
April 23, 2016 at 15:14 #10448Some more info I’ve just discovered:
problem solved after running /usr/bin/runrtorrent but returns again after reboot.root@geexbox:~# systemctl status rtorrent.service — rtorrent.service - rtorrent daemon Loaded: loaded (/usr/lib/systemd/system/rtorrent.service; disabled; vendor preset: enabled) Active: active (exited) since Sat 2016-04-23 16:08:33 BST; 57min left Process: 311 ExecStart=/usr/bin/runrtorrent (code=exited, status=0/SUCCESS) Main PID: 311 (code=exited, status=0/SUCCESS) CGroup: /system.slice/rtorrent.service Apr 23 16:08:33 geexbox runrtorrent[311]: mkdir: can't create directory '/rtorrent/': No such file or directory
/rtorrent is a link to external HDD:
rtorrent -> /media/Seagate Expansion Drive/rtorrentI guess that rtorrent starts before HDD is mounted?
any idea how to fix?April 29, 2016 at 07:42 #10458In default installation rtorrent point to /rtorrent folder. This is a phisical folder in SD. I replaced this folder with a symbolic link point to my external folder (in my external hard disk). I no changed any configuration/script file.
When hard disk will be mounted link will be available.This works for me.
Let me know.April 29, 2016 at 07:43 #10459Used something like:
cd / rm /rtorrent ln -s /external_drive/directory/../ /rtorrent
April 30, 2016 at 06:20 #10461Is that external disk attached via USB? There is some extra magick for this case, which is supposed to switch the target directory depending on the presence of the drive. It that has to be enabled via /etc/rtorent.cfg. But I never tried that as I don’t use rtorrent at all…
May 15, 2016 at 21:45 #10516Yes. External disk is attached via USB. there’s no file /etc/rtorent.cfg. but I could find /etc/rtorent.rc but couldn’t find any related config there.
Finally I could narrow down the problem.
After connecting with ssh and running runrtorrent command everything work but as soon as I exit from my ssh session – rtorrent stops.It seems that screen exits as soon as the ssh session terminates, regardless to rtorrent (tried even with ping). any ideas how to fix screen?
May 16, 2016 at 11:40 #10518That’s a normal behavior. There is no way to daemonize rtorrent directly. we use ‘screen’ for that.
So if you start a remote shell and start rtorrent, the rtorrent’s pid is a son of your remote shell. Stopping the shell, every sons are terminated too.
But, I didn’t test this recently using runrtorrent from a remote shell and I don’t remember if it works or noSo if you want to restart rtorrent, the best way is
systemctl restart rtorrent
if problem,
systemctl status rtorrent -l
can help to understand where is the problemI’m building a new version of rtorrent (0.9.6) and I saw a patch to daemonize it. Let’s see if I can add it
for usb devices, we have a script that can do the job (ie point /rtorrent -> /media/xxxx/rtorrent )
but you need to enable it , editing /etc/rtorrent.cfgMay 16, 2016 at 13:50 #10521tomlohave – thanks for your reply.
What I meant is that even when running some command after screen command – it exits when ssh session disconnects.
For example:
screen
ping 8.8.8.8
close ssh windowsI would expect that ping will still run but it doesn’t for some reason.
Anyway, I changed /etc/rtorrent.cfg as you said, rebooted and for now everything works as expected.
Will update if problem appears again
thanksMay 16, 2016 at 14:16 #10522hum, ok
just one question : did you detach the screen’s session before closing ssh ?May 16, 2016 at 15:26 #10523Yes, I did.
See the following shell output:
https://pastebin.com/avCfj95VNow I noticed a warning that /var/run/utmp doesn’t exist.
any idea if it’s related?May 16, 2016 at 16:05 #10524In addition to the screen issue, I see that after changing /etc/rtorrent.cfg to yes rtorrent starts to download to /tmp/rtorrent.
So I reverted back to “no” and now I see this:root@geexbox:~# systemctl status rtorrent -l ● rtorrent.service - rtorrent daemon Loaded: loaded (/usr/lib/systemd/system/rtorrent.service; disabled; vendor preset: enabled) Active: active (exited) since Mon 2016-05-16 17:02:16 BST; 59min left Process: 222 ExecStart=/usr/bin/runrtorrent (code=exited, status=0/SUCCESS) Main PID: 222 (code=exited, status=0/SUCCESS) CGroup: /system.slice/rtorrent.service May 16 16:02:16 geexbox runrtorrent[222]: mkdir: can't create directory '/rtorrent/': No such file or directory May 16 16:02:16 geexbox runrtorrent[222]: mkdir: can't create directory '/rtorrent/': No such file or directory
but /rtorrent exists :/
Trying to restart:root@geexbox:~# systemctl status rtorrent -l ● rtorrent.service - rtorrent daemon Loaded: loaded (/usr/lib/systemd/system/rtorrent.service; disabled; vendor preset: enabled) Active: active (exited) since Mon 2016-05-16 16:05:06 BST; 16s ago Process: 987 ExecStop=/usr/bin/stoprtorrent (code=exited, status=1/FAILURE) Process: 994 ExecStart=/usr/bin/runrtorrent (code=exited, status=0/SUCCESS) Main PID: 994 (code=exited, status=0/SUCCESS) CGroup: /system.slice/rtorrent.service May 16 16:05:06 geexbox systemd[1]: rtorrent.service: Failed with result 'exit-code'.
Is it possible that the service start before the USB disk is mounted?
May 16, 2016 at 20:23 #10526I see that after changing /etc/rtorrent.cfg to yes rtorrent starts to download to /tmp/rtorrent.
That’s normal, /tmp/rtorrent is a symlink to /media/xxxx/rtorrent
and if you check your usb disk you should have a “rtorrent” directory .
More infos here if you want to know exactly how it works :
https://github.com/OpenBricks/openbricks/blob/master/packages/net/rtorrent/script/check-rtorrent-usb-disk.shNow, without this enable on /etc/rtorrent.cfg, the problem you see is not normal.
Can you post the content ofls -al /
Is it possible that the service start before the USB disk is mounted?
Indeed, that’s why we have created the second script that enable rtorrent on usb disk load (in fact it reloads rtorrent , changing it’s config file … )
About screen, I have the exact same problem and of course we should not have it.
I have tested this from telnet and ssh. once logout the screen session is killed (but not the one started with systemd … )
@rudi : did you ever test this ?
one thing it seems (for me) abnormal is that $TTY is not set (telnet or ssh login)May 17, 2016 at 06:54 #10527@tomlohave: No, I did not test that. As said: I never used the torrent stuff at all…
May 17, 2016 at 06:57 #10528May 16 16:02:16 geexbox runrtorrent[222]: mkdir: can't create directory '/rtorrent/': No such file or directory May 16 16:02:16 geexbox runrtorrent[222]: mkdir: can't create directory '/rtorrent/': No such file or directory
Could it be that the symlink points to the not-yet-mounted drive?
May 17, 2016 at 08:21 #10529Could it be that the symlink points to the not-yet-mounted drive?
I think that’s the problem. That’s why using check-rtorrent-usb-disk.sh is IMHO better (no need to add extra time to wait the device)
No, I did not test that. As said: I never used the torrent stuff at all…
Sure, I was just talking about screen. Detached screen is killed on logout.
For rtorrent I have upgraded version number, I’m testing the patch to by pass the use of screen. Downloading an iso via bittorent (ubuntu) seems to work fine fine (download and upload are ok) -
AuthorPosts
You must be logged in to reply to this topic.