rTorrent stopped working (cubox)

April 23rd, 2016

Home Forums GeeXboX on ARM SoCs rTorrent stopped working (cubox)

Tagged: ,

This topic contains 18 replies, has 5 voices, and was last updated by  nirfun 1 month, 2 weeks ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #10447

    nirfun
    Member

    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

    #10448

    nirfun
    Member

    Some 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/rtorrent

    I guess that rtorrent starts before HDD is mounted?
    any idea how to fix?

    #10458

    skelos
    Participant

    In 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.

    #10459

    skelos
    Participant

    Used something like:

    cd /
    rm /rtorrent
    ln -s /external_drive/directory/../ /rtorrent
    #10461

    Warped Rudi
    Moderator

    Is 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…

    #10516

    nirfun
    Member

    Yes. 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?

    #10518

    tomlohave
    Moderator

    That’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 no

    So 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 problem

    I’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.cfg

    #10521

    nirfun
    Member

    tomlohave – 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 windows

    I 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
    thanks

    #10522

    tomlohave
    Moderator

    hum, ok
    just one question : did you detach the screen’s session before closing ssh ?

    #10523

    nirfun
    Member

    Yes, I did.
    See the following shell output:
    https://pastebin.com/avCfj95V

    Now I noticed a warning that /var/run/utmp doesn’t exist.
    any idea if it’s related?

    #10524

    nirfun
    Member

    In 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?

    #10526

    tomlohave
    Moderator

    I 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.sh

    Now, without this enable on /etc/rtorrent.cfg, the problem you see is not normal.
    Can you post the content of ls -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)

    #10527

    Warped Rudi
    Moderator

    @tomlohave: No, I did not test that. As said: I never used the torrent stuff at all…

    #10528

    Warped Rudi
    Moderator
    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

    Could it be that the symlink points to the not-yet-mounted drive?

    #10529

    Tomtom
    Member

    Could 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)

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.

Comments are closed.
just to get the non-minimized form of the element