You are not logged in.
I have a sabnzbd service that has few issues when started with systemd - and I can't seem to find a root cause.
When started as legacy rc.d script, it works ok.
1. Starting service (script blocks because it does not seem to return until timeout )
root@thor conf.d # systemctl restart sabnzbd.service /etc/conf.d
Error: No space left on device
<...few minutes, while service works...>
Job for sabnzbd.service failed. See 'systemctl status sabnzbd.service' and 'journalctl -n' for details.
2. Service seems to work ok (also pid file is created) until it gets killed by systemd(?)
3. Checking status:
root@thor conf.d # systemctl status sabnzbd.service /etc/conf.d
sabnzbd.service - SABnzbd binary newsreader
Loaded: loaded (/etc/systemd/system/sabnzbd.service; enabled)
Active: failed (Result: timeout) since Sun, 2012-11-04 17:14:23 EET; 15min ago
Process: 14866 ExecStart=/bin/sh/ -c python2 /opt/sabnzbd/SABnzbd.py ${SABNZBD_ARGS} --pid /run/sabnzbd (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/sabnzbd.service
Nov 04 17:12:53 thor systemd[1]: Starting SABnzbd binary newsreader...
Nov 04 17:14:23 thor systemd[1]: Failed to start SABnzbd binary newsreader.
Nov 04 17:14:23 thor systemd[1]: Unit sabnzbd.service entered failed state
4. Contents of the conf.d/sabnzbd_systemd:
# Systemd configuration file for SABnzbd
# NOTE: Change user, group and port in sabnzbd.service as well.
# Due to a bug these cannot be loaded from this config file
# Set the protocol, IP and port
SABNZBD_PROTOCOL=http
SABNZBD_IP=thor.local
SABNZBD_PORT=8081
# Set your default user/group(id), startarguments and your configfile
SABNZBD_DIR=/opt/sabnzbd
SABNZBD_ARGS=-f /opt/sabnzbd/sabnzbd.ini -s ${SABNZBD_IP}:${SABNZBD_PORT} -d
# Put the session keys from Config > General here
SABNZBD_KEY=foobar
NZB_KEY=
# If you use a username and password, change the following variable to
# "user:pass@"
SABNZBD_USPW=
5. Contents of sabnzbd.service:
[Unit]
Description=SABnzbd binary newsreader
After=network.target
[Service]
EnvironmentFile=/etc/conf.d/sabnzbd_systemd
ExecStart=/bin/sh/ -c "python2 /opt/sabnzbd/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-8081.pid
User=sabnzbd
Group=sabnzbd
[Install]
WantedBy=multi-user.target
Similar posts:
- https://bbs.archlinux.org/viewtopic.php?id=151390
- https://bbs.archlinux.org/viewtopic.php?id=150676
Offline
I am having the identical issue. Have you found anything that works?
Mine works for about 90 seconds, and then fails.
"I'm not a racist, I'm a bigot... there is a difference!" - Jim Jefferies
Offline
Also see the discussion in the comments of the AUR package: https://aur.archlinux.org/packages/sabnzbd/
Offline
Not really a case closed, but somehow Sabnzbd starts ok on boot up. Restarting the service afterwards still causes the problem specified earlier.
Offline
@jmu I was having the exact same issues as you, even on startup...
https://wiki.archlinux.org/index.php/SABnzbd the archwiki along with the above posted wiki did it for me.
Note the custom port section, I notice you have 8081 vs the default 8080.
I believe it was the copying /usr/lib/systemd/system/sabnzbd.service to /etc/systemd/system which made it stable.
I also disabled https, as it was suggested and I never used it
"I'm not a racist, I'm a bigot... there is a difference!" - Jim Jefferies
Offline
Similar here. If I setup my system to start sabnzbd with the --user flag (ie, "$ systemctl --user enable sabnzbd", it seems to start--but then times-out and stops.
If I start it without the --user flag ("# systemctl enable sabnzbd") it starts up and stays up...
Hey, be nice...I'm new at this!
Offline
I had the same timeout error.
In my case, the /run/sabnzbd/ folder has sabnzbd:sabnzbd permissions. I run sabnzbd with another user which is in the sabnzbd group. No pidfile appeared in /run/sabnzbd/ and no error showed up about that with systemctl status sabnzbd.service.
Now that I have changed the permissions of the /run/sabnzbd folder to the other user I can start sabnzbd from the command line.
So, altough I found no error about it, not being able to write the pidfile was my problem.
Last edited by JohnD (2012-11-19 16:13:48)
Offline
Thanks for the suggestions, but none of them seem to resolve the issue in my setup.
But clearly there are many things that can go wrong
Offline