Sonarr not starting: (code=exited, status=217/USER)


#1

Sonarr version (exact version): 2.0.0.5252
Mono version (if Sonarr is not running on Windows): 5.16.0.187
OS: CentOS 7
Debug logs: I didn’t have debug running since I wasn’t having issues before
Description of issue: The service went down and this time I can’t get it to come back up. It looks to me that mono is somehow failing as if it isn’t existing, but it definitely does exist in /usr/bin, I double checked. If there is more information I can provide, let me know.

[root@mediamgr logs]# systemctl status sonarr.service
● sonarr.service - Sonarr Daemon
   Loaded: loaded (/etc/systemd/system/sonarr.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Fri 2018-11-23 05:08:08 CST; 6h ago
  Process: 948 ExecStart=/usr/bin/mono /apps/sonarr/bin/NzbDrone.exe -nobrowser (code=exited, status=217/USER)
 Main PID: 948 (code=exited, status=217/USER)

Nov 23 05:08:08 mediamgr.local systemd[1]: sonarr.service holdoff time over, scheduling restart.
Nov 23 05:08:08 mediamgr.local systemd[1]: start request repeated too quickly for sonarr.service
Nov 23 05:08:08 mediamgr.local systemd[1]: Failed to start Sonarr Daemon.
Nov 23 05:08:08 mediamgr.local systemd[1]: Unit sonarr.service entered failed state.
Nov 23 05:08:08 mediamgr.local systemd[1]: sonarr.service failed.
[root@mediamgr logs]# cat /etc/systemd/system/sonarr.service
[Unit]
Description=Sonarr Daemon
After=network.target

[Service]
User=nzbdrone
Group=nzbdrone

Type=simple
ExecStart=/usr/bin/mono /apps/sonarr/bin/NzbDrone.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

And my journalctl -xe:

-- Subject: Unit sonarr.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonarr.service has begun starting up.
Nov 23 11:28:58 mediamgr.local systemd[1719]: Failed at step USER spawning /usr/bin/mono: No such process
-- Subject: Process /usr/bin/mono could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/bin/mono could not be executed and failed.
--
-- The error number returned by this process is 3.
Nov 23 11:28:58 mediamgr.local systemd[1]: sonarr.service: main process exited, code=exited, status=217/USER
Nov 23 11:28:58 mediamgr.local systemd[1]: Unit sonarr.service entered failed state.
Nov 23 11:28:58 mediamgr.local systemd[1]: sonarr.service failed.
Nov 23 11:28:58 mediamgr.local systemd[1]: sonarr.service holdoff time over, scheduling restart.
Nov 23 11:28:58 mediamgr.local systemd[1]: start request repeated too quickly for sonarr.service
Nov 23 11:28:58 mediamgr.local systemd[1]: Failed to start Sonarr Daemon.
-- Subject: Unit sonarr.service has failed


#2

I just found the error. For some reason my user was wrong in my sonarr.service. I have no idea how it was working before if the user was wrong, or how the user would have changed. It’s corrected and working now.