You are not logged in.

#1 2013-01-24 20:55:00

CatPood
Member
Registered: 2013-01-24
Posts: 2

rTorrent+Screen doesn't start properly from systemd

I decided to finally upgrade my system from init.d to systemd.
Pretty much everything went smoothly except my rtorrent+screen startup.

I'm using mostly the ruTorrent webui for controlling rtorrent. I'm using a service that starts rTorrent in a detatched GNU screen.
This is my problem, when I start the service, rtorrent is just king of sleeping and not responding/doesn't create a SCGI socket I use to connect my webui to the rtorrent client.
If I attach the screen the problem goes away and rtorrent resumes normal operation. If I run the exact same commands through a shell, it also works perfectly.
I've also tried to run a basic screen as a service with rtorrent in my ~/.screenrc .
Can anyone help? I've got no idea how to do debug this more than checking so that rtorrent and the service are running.

This is my service:


 
[Unit]
Description=rTorrent

[Service]
Type=forking
ExecStart=/usr/bin/screen -d -m -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 rtorrent

[Install]
WantedBy=multi-user.target

My systemctl status output:

rtorrent.service - rTorrent
	  Loaded: loaded (/etc/systemd/system/rtorrent.service; enabled)
	  Active: active (running) since Thu 2013-01-24 21:50:10 CET; 54s ago
	 Process: 1130 ExecStart=/usr/bin/screen -d -m -S rtorrent /usr/bin/rtorrent (code=exited, status=0/SUCCESS)
	Main PID: 1131 (screen)
	  CGroup: name=systemd:/system/rtorrent.service
		  1131 /usr/bin/SCREEN -d -m -S rtorrent /usr/bin/rtorrent
		  1133 rtorrent

Jan 24 21:50:10 Laptop systemd[1]: Starting rTorrent...
Jan 24 21:50:10 Laptop systemd[1]: Started rTorrent.

ps -aux | grep rtorrent output

root      1131  0.0  0.0  15560  1008 ?        Ss   21:50   0:00 /usr/bin/SCREEN -d -m -S rtorrent /usr/bin/rtorrent
root      1133  0.0  0.1 201528  5172 pts/0    Ssl+ 21:50   0:00 rtorrent

Offline

#2 2013-01-25 10:24:50

alf
Member
From: Tromsø, Norway
Registered: 2010-07-05
Posts: 35

Re: rTorrent+Screen doesn't start properly from systemd

wrong post

Last edited by alf (2013-01-25 10:25:17)

Offline

#3 2013-02-03 21:57:17

CatPood
Member
Registered: 2013-01-24
Posts: 2

Re: rTorrent+Screen doesn't start properly from systemd

Bump, anyone?

Offline

#4 2013-03-13 04:59:21

Dj_kourampies
Member
From: Greece
Registered: 2005-11-02
Posts: 32
Website

Re: rTorrent+Screen doesn't start properly from systemd

Same thing happening to me. Tried both screen and tmux, from the scripts I ve found in the forum, that supposedly work for others.

Offline

#5 2013-03-13 08:11:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,837

Re: rTorrent+Screen doesn't start properly from systemd

This works for me, YMMV:

/etc/systemd/system/screen.service

[Unit]
Description=Detached screen session
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
User=tomk
ExecStart=/usr/bin/screen -dm

[Install]
Wants=network.target
WantedBy=multi-user.target

~/.screenrc

...
screen -t rtorrent     5 /usr/bin/rtorrent
...

Offline

Board footer

Powered by FluxBB