Find the answer to your Linux question:
Results 1 to 4 of 4
I know this thread rumours around for some time now and it is usually not a good idea to bump it to the head, but my problem is quite similar. ...
  1. #1
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    718

    rtorrent won't start

    I know this thread rumours around for some time now and it is usually not a good idea to bump it to the head, but my problem is quite similar. I have set up the script, it is run and the screen starts. But rtorrent won't start. It starts only if I run the /etc/init.d/rtorrent start manually. The init script is from here, more or less the official version. Does anyone know why a app don't start with init.d? A big problem, of course, is that there are no logs to examine why it fails in the first place. It could be a simple dependency problem, but as it starts with prio 99, even this should be fine.

  2. #2
    Linux User cheesecake42's Avatar
    Join Date
    Jan 2007
    Location
    Panama City, FL
    Posts
    364
    I'm a little confused, so I need a couple of things clarified. the script located in /etc/init.d/rtorren, is that different from the script you are using from Attachment ? The libTorrent and rTorrent Project ?

    If that is a seperate script, and /etc/init.d/rtorrent works to start rtorrent, why use a seperate script?

  3. #3
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    718
    no, it's the same script. this is why i posted it. i just added the lsb header information that was missing. these are basically just comments that give the init.d some information about the script. i.e. what it does etc.

    the problem is, the script seems to work flawflessly as long as i execute it manually with:

    /etc/init.d/rtorrent start|stop|restart

    But on system boot, where it is being executed as the logfiles tell me, it just has no effect. rtorrent is not started in the screen session and just not there (i.e. ps -A | grep rtorrent ==> nil).

    I asked the same question to the libtorrent mailing list, but there noone couldn't help me either. It seems not to be a problem with the script, but something between init.d, screen, rtorrent and ubuntu during startup. It just looks like as if the script is being executed, but somehow the screen is killed right afterwards.

    in the end i rewrote the start function to

    Code:
    d_start() {
      echo "`date` - starting rtorrent" | tee -a "$logfile" >&2
      [ -d "${base}" ] && cd "${base}"
      stty stop undef && stty start undef
      su -c "screen -dm -S ${srnname} rtorrent ${options}" ${user}
    }
    which again works fine as long as i execute it manually as root. the logfiles state "starting rtorrent" just as written in the echo, but the screen is not there.

  4. #4
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    718
    I just recognized it now that this thread is in the wrong topic. I'm having this problem on ubuntu 10.03 and therefore this thread should be moved there.

    Also I would like to keep you up-to-date with my assumptions, because it may help resolving the problem. I believe that it is a screen problem. screen needs a console to attach to and maybe there is none that screen could attach to at the moment when init runs. How would I do if I had to check this or can someone deny this error for sure? Any more ideas why a script wouldn't start an application like screen during init?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...