failed to start with systemd

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
meokey
Posts: 1
Joined: Thu Dec 06, 2018 3:14 am

failed to start with systemd

Post by meokey » Thu Dec 06, 2018 3:25 am

I'm trying to start transmission-daemon using systemd, but I fail no matter how I change the service file. please help... any advise would be appreciated
$ uname -a
Linux vps1.bchen.work 4.19.6-1.el7.elrepo.x86_64 #1 SMP Sat Dec 1 11:58:18 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
using https://github.com/transmission/transmi ... on.service,
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission/transmission.log
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target
I experience timeout error:
$ sudo systemctl status transmission-daemon
● transmission-daemon.service - Transmission BitTorrent Daemon
Loaded: loaded (/usr/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: disabled)
Active: failed (Result: timeout) since Wed 2018-12-05 22:11:01 EST; 7s ago
Process: 23404 ExecStart=/usr/local/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission/transmission.log (code=exited, status=0/SUCCESS)
Main PID: 23404 (code=exited, status=0/SUCCESS)

Dec 05 22:09:27 vps1.bchen.work systemd[1]: Starting Transmission BitTorrent Daemon...
Dec 05 22:10:57 vps1.bchen.work systemd[1]: transmission-daemon.service start operation timed out. Terminating.
Dec 05 22:11:01 vps1.bchen.work systemd[1]: Failed to start Transmission BitTorrent Daemon.
Dec 05 22:11:01 vps1.bchen.work systemd[1]: Unit transmission-daemon.service entered failed state.
Dec 05 22:11:01 vps1.bchen.work systemd[1]: transmission-daemon.service failed.
and last few lines of the log file reads:
[2018-12-05 22:11:01.333] Saved "/var/lib/transmission/.config/transmission-daemon/resume/ccf9d6aa6449db7e.resume" (variant.c:1266)
[2018-12-05 22:11:01.333] Saved "/var/lib/transmission/.config/transmission-daemon/stats.json" (variant.c:1266)
[2018-12-05 22:11:01.333] Closing libevent thread (trevent.c:262)

if I remove the argument "-f" and have an "%" at the end of command, it does not start up at all:
$ cat /usr/lib/systemd/system/transmission-daemon.service
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=transmission
Type=notify
ExecStart=/usr/local/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission/transmission.log &
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target
$ sudo systemctl status transmission-daemon
● transmission-daemon.service - Transmission BitTorrent Daemon
Loaded: loaded (/usr/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2018-12-05 22:12:05 EST; 3s ago
Process: 23462 ExecStart=/usr/local/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission/transmission.log & (code=exited, status=0/SUCCESS)
Main PID: 23462 (code=exited, status=0/SUCCESS)

Dec 05 22:12:05 vps1.bchen.work systemd[1]: Starting Transmission BitTorrent Daemon...
Dec 05 22:12:05 vps1.bchen.work systemd[1]: Started Transmission BitTorrent Daemon.
[bill@vps1 transmission-2.94]$ sudo systemctl status transmission-daemon
● transmission-daemon.service - Transmission BitTorrent Daemon
Loaded: loaded (/usr/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2018-12-05 22:12:05 EST; 6s ago
Process: 23462 ExecStart=/usr/local/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission/transmission.log & (code=exited, status=0/SUCCESS)
Main PID: 23462 (code=exited, status=0/SUCCESS)

littlejeem
Posts: 1
Joined: Fri Jan 11, 2019 7:18 pm

Re: failed to start with systemd

Post by littlejeem » Fri Jan 11, 2019 7:33 pm

Hello Meokey

I am far from an expert, in fact, I'm here to ask for help myself so not sure if I'm helping or hindering.

I'm running transmission-daemon on Debian stretch. When the package installs, it defaults to creating a user '

Code: Select all

debian-transmission
' and when the service is started runs as this user.

Code: Select all

[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=debian-transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecStop=/bin/kill -s STOP $MAINPID
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target
I note that in your service above the user is listed as 't

Code: Select all

ransmission
' is that the user you are trying to run transmission as?

Post Reply