# Issues with rtorrentd starting

## macotine

Just recently setup my Gentoo box and was going to use rtorrent + rutorrent as a torrenting solution however I seem to be running into some strange issues with rtorrent.

When I first emerged it I ran it as root to check it out and see how it worked, and it worked fine there, but then I read that the recommended practice is to run it under a non-root user so I created a user named rtorrentd, stopped rtorrent and moved my .rtorrent.rc file to the new user's directory. Then I edited my /etc/conf.d/rtorrentd file to specify the new user and then tried to restart the daemon. It restarted without displaying any errors but does not attach to any screen for me to access. If I try and restart the daemon it outputs the following:

```
 * Stopping rtorrent ...

 * start-stop-daemon: no matching processes found                                                                     [ ok ]

 * Starting rtorrent ...                                                                                                                [ ok ]
```

And still has no screen session to attach to. There's also no rtorrent process anywhere on my machine and switching the execution back to starting under root did not help either, it exhibits the same behavior.

Can anyone help me or at least offer some suggestions on where to start trying to troubleshoot these issues.

----------

## mbjr

Not sure if this helps (feel free to tell me that it didn't  :Wink: )

I gave up on running rtorrentd as a daemon back a while ago, using the following instead:

```
#su -c "screen -sDm rtorrent rtorrent" myuser
```

No trouble from this point on  :Wink: 

----------

## akadaedalus

Reviving this thread because it came up in google searches and wasn't any help.

I ran into this issue, rewriting the init script a bajillion times, thinking something must have changed in any of GNU Screen, rtorrent, and start-stop-daemon.

The embarrassing reality was that rtorrent was simply misconfigured for daemonizing.  In .rtorrent.rc I had relative path names because the example path name was like the following:

```

# Default session directory. Make sure you don't run multiple instance

# of rtorrent using the same session directory. Perhaps using a

# relative path?

#session = ./session

```

rtorrent chokes because the working directory is not the home directory, and it could not find ~/session.

The cleanest fix for me was to change ./session to ~/session in rtorrent.rc.  I was able to use the init script after that.  I sure wish I didn't spend three hours trying to track this down.

----------

