You are not logged in.

#1 2012-10-25 00:11:26

aluxogen
Member
Registered: 2012-10-24
Posts: 1

systemd service failing on boot

Hello, im new to Arch and systemd

When I boot my computer the sabnzbd service fails to start, but if i start it manually afterwards it works fine.

I can make it work by adding a 'sleep 10' to the .service file but that seems like a hack and I'd like to learn the correct way.

It seems as though the sabnzbd.service is starting before the /run tmpfs partition has been mounted but I dont know. 

I'm hoping someone smarter than me knows the answer to this

Thanks
Dave

Below is the messages.log

Oct 24 19:58:35 winter systemd[1]: PID file /run/sabnzbd/sabnzbd-8080.pid not readable (yet?) after start.
Oct 24 19:58:36 winter systemd[1]: sabnzbd.service never wrote its PID file. Failing.
Oct 24 19:58:36 winter systemd[1]: Unit sabnzbd.service entered failed state.
Oct 24 19:58:36 winter systemd[1]: Starting Multi-User.
Oct 24 19:58:36 winter systemd[1]: Reached target Multi-User.
Oct 24 19:58:36 winter systemd[1]: Starting Graphical Interface.
Oct 24 19:58:36 winter systemd[1]: Reached target Graphical Interface.
Oct 24 19:58:36 winter systemd[1]: Starting Update UTMP about System Runlevel Changes...
Oct 24 19:58:36 winter systemd[1]: Started Update UTMP about System Runlevel Changes.
Oct 24 19:58:36 winter systemd[1]: Startup finished in 4s 330ms 255us (kernel) + 8s 66ms 514us (userspace) = 12s 396ms 769us.
Oct 24 19:58:36 winter ifplugd[282]: Executing '/etc/ifplugd/netcfg.action eth0 up'.
Oct 24 19:58:36 winter ifplugd[282]: client: up
Oct 24 19:58:36 winter ifplugd[282]: client: loading ethernet-static
Oct 24 19:58:36 winter ifplugd[282]: client: :: ethernet-static up [done]
Oct 24 19:58:36 winter ifplugd[282]: Program executed successfully.

sabnzbd.service:

[Unit]
Description=SABnzbd binary newsreader
After=network.target

[Service]
EnvironmentFile=/etc/conf.d/sabnzbd_systemd
#ExecStartPre=/usr/bin/sleep 10
ExecStart=/bin/sh/ -c "python2 ${SABNZBD_DIR}/SABnzbd.py ${SABNZBD_ARGS} --pid /run/sabnzbd"
ExecStop=/usr/bin/curl -f "${SABNZBD_PROTOCOL}://${SABNZBD_USPW}${SABNZBD_IP}:${SABNZBD_PORT}/sabnzbd/api?mode=shutdown&apikey=${SABNZBD_KEY}"
Type=forking
PIDFile=/run/sabnzbd/sabnzbd-8080.pid
User=sabnzbd
Group=sabnzbd

[Install]
WantedBy=multi-user.target

Offline

#2 2012-10-25 01:11:15

foppe
Member
Registered: 2011-04-02
Posts: 47

Re: systemd service failing on boot

For diagnostics try:
# systemctl status sabnzbd.service

Offline

Board footer

Powered by FluxBB