localhost / # /etc/init.d/rtorrentd start * Starting rtorrent ... [ ok ] localhost / # /etc/init.d/rtorrentd status * status: crashed localhost / # /etc/init.d/rtorrentd stop * Stopping rtorrent ... [ !! ] * ERROR: rtorrentd failed to stop localhost / # /etc/init.d/rtorrentd stop * Stopping rtorrent ... pgrep: option requires an argument -- 'P' Usage: pgrep [options] <pattern> Options: -d, --delimiter <string> specify output delimiter -l, --list-name list PID and process name -a, --list-full list PID and full command line -v, --inverse negates the matching -w, --lightweight list all TID -c, --count count of matching processes -f, --full use full process name to match -g, --pgroup <PGID,...> match listed process group IDs -G, --group <GID,...> match real group IDs -i, --ignore-case match case insensitively -n, --newest select most recently started -o, --oldest select least recently started -P, --parent <PPID,...> match only child processes of the given parent -s, --session <SID,...> match session IDs -t, --terminal <tty,...> match by controlling terminal -u, --euid <ID,...> match by effective IDs -U, --uid <ID,...> match by real IDs -x, --exact match exactly with the command name -F, --pidfile <file> read PIDs from file -L, --logpidfile fail if PID file is not locked --ns <PID> match the processes that belong to the same namespace as <pid> --nslist <ns,...> list which namespaces will be considered for the --ns option. Available namespaces: ipc, mnt, net, pid, user, uts -h, --help display this help and exit -V, --version output version information and exit For more details see pgrep(1). [ !! ] * ERROR: rtorrentd failed to stop localhost / # And I can't stop it manually, only reboot helps.
There's probably only one real bug here: The init script fails to indicate rtorrent is stopped once it's crashed. I'll take a look at this next week, unless someone else wants to take it first. With regards to why it's crashing, it's probably just a configuration problem. Are you able to run it manually with the same options it would be using if started from the init script (e.g. the correct user)?
/etc/conf.d/rtorrentd USER="p2p" If I run start command like in init script from the regular user (not "p2p"): /usr/bin/screen -- -D -m -S rtorrentd /usr/bin/rtorrent I see black screen few seconds and then: [screen is terminating] If I just start '/usr/bin/rtorrent' from the regular user is seems like starts successfully, and quit too. When I tried to start it from init script after system boot - it indicates no errors, but the /var/run/rtorrentd.pid is empty (doesn't contain any number; zero size file) for some reason... After this I can't stop it by init script (see above), only reboot.
I find out the crash reason, ~/.rtorrent.rc If I delete it the rtorrentd starts successfully. But if I write some options there - rtorrentd crashes. Contents of the ~/.rtorrentd directory = /home/p2p/Downloads session = /home/p2p/_session session_save = yes schedule = watch_directory,5,5,load_start=/home/p2p/_watch/*.torrent port_range = 61000-61000 port_random = no encryption = allow_incoming,try_outgoing,enable_retry,prefer_plaintext dht = auto dht_port = 61000 peer_exchange = yes
Well, the problem is that newer versions of rtorrent use different syntax for ~/.rtorrent.rc https://github.com/rakshasa/rtorrent/wiki/RPC-Migration-0.9 The rTorrent Configuration Template (new syntax) is here: https://github.com/rakshasa/rtorrent/wiki/CONFIG-Template So, please, keep https://wiki.gentoo.org/wiki/RTorrent up-to-date. Also, it would be good if ebuild would warns about changes like that.
https://wiki.gentoo.org/index.php?title=RTorrent&diff=821902&oldid=813191 Wiki seems to be fixed, as for the transition and a warning in the ebuild, that time seems to have passed. 0.9.7 is the oldest in portage. Propose RESOLVED, FIXED?