sonarr and radarr fail to start on reboot RPI4 Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
stevewitz
Posts: 2
Joined: Tue Sep 21, 2021 6:04 am

sonarr and radarr fail to start on reboot RPI4

Post by stevewitz »

Hi,
I have started up a new Dietpi system to replace an existing installation. RPI4 booting from a SSD on USB3 port. Have tried reinstalling the system several times with the same result every time. Installing 7.5.2 bullseye version, but have upgraded to 7.6.2 with the same result.

radarr, sonarr, nzbget and emby all install fine and run perfectly UNTIL the system is restarted, then sonarr and radarr wont restart. If I do 'dietpi-software reinstall sonar' or 'dietpi-software reinstall radarr' then they come back to life and everything is fine.

It seems that services are just not restarting. Her is the output of joournelctl:

Code: Select all

sonarr.service: Failed to set up mount namespacing: /run/systemd/unit-root/var/log/sonarr: No such file or directory
sonarr.service: Failed at step NAMESPACE spawning /usr/bin/mono: No such file or directory
radarr.service: Failed to set up mount namespacing: /run/systemd/unit-root/var/log/radarr: No such file or directory
radarr.service: Failed at step NAMESPACE spawning /opt/radarr/Radarr: No such file or directory
As I said, everything works when reinstalled, just not with a reboot.

Any suggestions would be greatly appreciated!
Steve
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: sonarr and radarr fail to start on reboot RPI4

Post by Joulinar »

we had a couple of cases like this but no solution until now viewtopic.php?f=11&t=9234

How do you restart your system?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
uplusion23
Posts: 1
Joined: Tue Sep 21, 2021 6:52 am

Re: sonarr and radarr fail to start on reboot RPI4

Post by uplusion23 »

I had this same issue, and was able to solve it after a day spent looking around. The issue for me seemed to be with the permissions hardening in the sonarr.service.

If you edit the systemd entry point, comment everything out under the "#Hardening" and restart the Raspberry Pi, and I was able to get Sonarr working. [Radarr was already functional for me]
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: sonarr and radarr fail to start on reboot RPI4

Post by MichaIng »

Nasty, the problem is that all paths listed in the systemd units ReadWritePaths setting need to exist. Also the output of above shows it: viewtopic.php?p=37959#p37959

The log directory is missing in your case. So commenting the hardenings wouldn't help as Sonarr and Radarr still require the log directory to start:

Code: Select all

mkdir /var/log/sonarr
chown sonarr /var/log/sonarr
The other directory which could possibly missing is /media.

Just found a solution to let systemd ignore non-existing paths and applied it for all such cases, since we want a meaningful error message and not something cryptic about NAMESPACE which no-one was able to interpret until now 8): https://github.com/MichaIng/DietPi/commit/5320442
stevewitz
Posts: 2
Joined: Tue Sep 21, 2021 6:04 am

Re: sonarr and radarr fail to start on reboot RPI4

Post by stevewitz »

Thank you VERY much!

Steve
Post Reply