You are not logged in.

#1 2013-02-23 21:00:01

spurious_access
Member
Registered: 2013-02-23
Posts: 15

Sickbeard fails to start. "Unable to write PID file" [Solved]

I've installed sickbeard from the AUR but can't seem to get it started.

when running "sudo systemctl start sickbeard.service" I get the following output:

Job for sickbeard.service failed. See 'systemctl status sickbeard.service' and 'journalctl -xn' for details.

'systemctl status sickbeard.service' provides:

sickbeard.service - SickBeard daemon
      Loaded: loaded (/etc/systemd/system/sickbeard.service; disabled)
      Active: failed (Result: exit-code) since Sat 2013-02-23 14:49:19 CST; 1min 4s ago
     Process: 11518 ExecStart=/usr/bin/sickbeard --nolaunch --daemon --quiet --config $SB_CONF --datadir $SB_DATA --port $SB_PORT --pidfile=/run/sickbeard/sickbeard-8081.pid (code=exited, status=1/FAILURE)

Feb 23 14:49:18 arch systemd[1]: Starting SickBeard daemon...
Feb 23 14:49:19 arch sickbeard[11518]: Unable to write PID file: No such file or directory [2]
Feb 23 14:49:19 arch systemd[1]: sickbeard.service: control process exited, code=exited status=1
Feb 23 14:49:19 arch systemd[1]: Failed to start SickBeard daemon.
Feb 23 14:49:19 arch systemd[1]: Unit sickbeard.service entered failed state

And it looks like 'journalctl -xn' provides about the same info:

-- Logs begin at Tue 2013-01-08 17:25:44 CST, end at Sat 2013-02-23 14:53:29 CST. --
Feb 23 14:49:19 arch sickbeard[11518]: Unable to write PID file: No such file or directory [2]
Feb 23 14:49:19 arch systemd[1]: sickbeard.service: control process exited, code=exited status=1
Feb 23 14:49:19 arch systemd[1]: Failed to start SickBeard daemon.
-- Subject: Unit sickbeard.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li … temd-devel
-- Documentation: http://www.freedesktop.org/wiki/Softwar … e9d022f03d
--
-- Unit sickbeard.service has failed.
--
-- The result is failed.
Feb 23 14:49:19 arch systemd[1]: Unit sickbeard.service entered failed state

Also, here is the current systemd file for sickbeard, if that helps:

[Unit]
Description=SickBeard daemon
After=network.target

[Service]
EnvironmentFile=/etc/conf.d/sickbeard
User=sickbeard
Group=sickbeard
ExecStart=/usr/bin/sickbeard --nolaunch --daemon --quiet --config "$SB_CONF" --datadir "$SB_DATA" --port "$SB_PORT" --pidfile=/run/sickbeard/sickbeard-8081.pid
Type=forking
TimeoutStopSec=20
PIDFile=/run/sickbeard/sickbeard-8081.pid

[Install]
WantedBy=multi-user.target

So I guess obviously the important part is "Unable to write PID file: No such file or directory [2]", but I'm not really sure what that means or how to fix it. I've played around with the PIDfile configuration for the systemd service (tried renaming from sickbeard to sickbeard-8081) but I always get the same error.
Any ideas?

Edit: Solved by teekay

Last edited by spurious_access (2013-02-24 08:09:01)


ghostwheel | Custom | Arch with linux-ck-nehalem |  x86_64 | BIOS | grub2 | systemd | BTRFS | Intel Core i7 920 @ 3.2 GHz | 18GB RAM | 80gb Intel 320 SSD (boot) | 1.5TB 7200 RPM Seagate HDD (storage)

hactar | Google CR-48 | Arch with linux-ck-atom | x86_64 | EFI | grub2 | systemd | ext4  | Intel Atom | 2GB RAM | 64 gb Kingston SSD | Atheros Wireless

Offline

#2 2013-02-24 07:40:01

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Sickbeard fails to start. "Unable to write PID file" [Solved]

Most likely /run/sickbeard doesn't exist yet. This is the case when you did not reboot yet after installing sickbeard.
Reboot isn't required though, just run

systemd-tmpfiles --create

This will create the directory, based on /usr/lib/tmpfiles.d/sickbeard.conf which the sickbeard package installs

Last edited by teekay (2013-02-24 07:41:37)

Offline

#3 2013-02-24 07:48:20

spurious_access
Member
Registered: 2013-02-23
Posts: 15

Re: Sickbeard fails to start. "Unable to write PID file" [Solved]

Awesome, that worked!
So why wouldn't that just happen automatically? I think Sabnzbd uses a similar setup and I don't think I had to restart in order to do that for it to work, although I could be mistaken.


ghostwheel | Custom | Arch with linux-ck-nehalem |  x86_64 | BIOS | grub2 | systemd | BTRFS | Intel Core i7 920 @ 3.2 GHz | 18GB RAM | 80gb Intel 320 SSD (boot) | 1.5TB 7200 RPM Seagate HDD (storage)

hactar | Google CR-48 | Arch with linux-ck-atom | x86_64 | EFI | grub2 | systemd | ext4  | Intel Atom | 2GB RAM | 64 gb Kingston SSD | Atheros Wireless

Offline

#4 2013-02-24 08:46:54

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Sickbeard fails to start. "Unable to write PID file" [Solved]

The sabnzbd systemd unit file doesn't use a pidfile. Not sure why. It would make more sense there than it does for sickbeard, because IMHO sickbeard should run as the user who owns the target tv-series media folders. Using tmpfiles.d just causes a headache when you are going to update it using the AUR package.

I installed it once using sickbeard-git from AUR, changed the systemd unit file and /usr/lib/tmpfiles.d/sickbeard.conf to match my user, chown -R'ed /opt/sickbeard, ran "pacman -R --dbonly sickbeard-git", and ever since use "git pull" to update. That also works directly from web interface.

Last edited by teekay (2013-02-24 08:47:42)

Offline

Board footer

Powered by FluxBB