Sonarr / Lidarr / Radarr not starting

Hi everybody,

Seems my DietPi has thrown a little wobbly this morning. Went to look at pi-hole and the page wouldn’t load and timing out, so tried to putty into it and this was timing out, so thought I would pull the power on it to reboot (first time I’ve had to do that too) and things started up as normal, but now seems that Sonarr, Lidarr and Radarr services will not start.

I’ve just starting the services through the dietpi-launcher and it comes back as failed, htop isn’t showing the services as starting and if I do a journalctl -u sonarr.service I get the following

-- Logs begin at Thu 2019-02-14 10:11:58 GMT, end at Fri 2021-04-09 08:56:07 BST. --
Apr 09 08:55:35 DietPi systemd[1]: Started Sonarr Daemon (DietPi).
Apr 09 08:55:35 DietPi systemd[582]: sonarr.service: Failed to set up mount na
mespacing: No such file or directory
Apr 09 08:55:35 DietPi systemd[582]: sonarr.service: Failed at step NAMESPACE
spawning /usr/bin/mono: No such file or directory
Apr 09 08:55:35 DietPi systemd[1]: sonarr.service: Main process exited, code=e
xited, status=226/NAMESPACE
Apr 09 08:55:35 DietPi systemd[1]: sonarr.service: Failed with result 'exit-co
de'.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Service RestartSec=100ms expired, scheduling restar
t.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Scheduled restart job, restart counter is at 1.
Apr 09 08:55:36 DietPi systemd[1]: Stopped Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[1]: Started Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[596]: sonarr.service: Failed to set up mount na
mespacing: No such file or directory
Apr 09 08:55:36 DietPi systemd[596]: sonarr.service: Failed at step NAMESPACE
spawning /usr/bin/mono: No such file or directory
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Main process exited, code=e
xited, status=226/NAMESPACE
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Failed with result 'exit-co
de'.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Service RestartSec=100ms expired, scheduling restar
t.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Scheduled restart job, restart counter is at 2.
Apr 09 08:55:36 DietPi systemd[1]: Stopped Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[1]: Started Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[626]: sonarr.service: Failed to set up mount na
mespacing: No such file or directory
Apr 09 08:55:36 DietPi systemd[626]: sonarr.service: Failed at step NAMESPACE
spawning /usr/bin/mono: No such file or directory
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Main process exited, code=e
xited, status=226/NAMESPACE
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Failed with result 'exit-co
de'.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Service RestartSec=100ms expired, scheduling restar
t.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Scheduled restart job, restart counter is at 3.
Apr 09 08:55:36 DietPi systemd[1]: Stopped Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[1]: Started Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[680]: sonarr.service: Failed to set up mount na
mespacing: No such file or directory
Apr 09 08:55:36 DietPi systemd[680]: sonarr.service: Failed at step NAMESPACE
spawning /usr/bin/mono: No such file or directory
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Main process exited, code=e
xited, status=226/NAMESPACE
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Failed with result 'exit-co
de'.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Service RestartSec=100ms expired, scheduling restar
t.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Scheduled restart job, restart counter is at 4.
Apr 09 08:55:36 DietPi systemd[1]: Stopped Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[1]: Started Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[700]: sonarr.service: Failed to set up mount na
mespacing: No such file or directory
Apr 09 08:55:36 DietPi systemd[700]: sonarr.service: Failed at step NAMESPACE
spawning /usr/bin/mono: No such file or directory
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Main process exited, code=e
xited, status=226/NAMESPACE
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Failed with result 'exit-co
de'.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Service RestartSec=100ms expired, scheduling restar
t.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Scheduled restart job, restart counter is at 5.
Apr 09 08:55:36 DietPi systemd[1]: Stopped Sonarr Daemon (DietPi).
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Start request repeated too
quickly.
Apr 09 08:55:36 DietPi systemd[1]: sonarr.service: Failed with result 'exit-co
de'.
Apr 09 08:55:36 DietPi systemd[1]: Failed to start Sonarr Daemon (DietPi).

I’m a bit of a linux noob, so need some help here please :frowning:

Well, managed to get Radarr started by a command I found on here

sudo -u radarr /opt/radarr/Radarr -nobrowser -data=/mnt/dietpi_userdata/radarr

Shame the command doesn’t work for Sonarr & Lidarr, so a bit more digging about

Back up and running for Sonarr & Lidarr now. Found the commands in the services file

sudo -u sonarr /usr/bin/mono -O=-aot /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/mnt/dietpi_userdata/sonarr

sudo -u lidarr /usr/bin/mono -O=-aot /opt/Lidarr/Lidarr.exe -nobrowser -data=/mnt/dietpi_userdata/lidarr

Seems that pulling the power had caused issues wth the logging database

[Error] DbFactory: Logging database is corrupt, attempting to recreate it automatically

[v2.0.0.5344] System.Data.SQLite.SQLiteException (0x80004005): unable to open database file
  at System.Data.SQLite.SQLite3.Open (System.String strFilename, System.Data.SQLite.SQLiteConnectionFlags connectionFlags, System.Data.SQLite.SQLiteOpenFlagsEnum openFlags, System.Int32 maxPoolSize, System.Boolean usePool) [0x00074] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteConnection.Open () [0x00959] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at FluentMigrator.Runner.Processors.GenericProcessorBase.EnsureConnectionIsOpen () [0x00014] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Exists (System.String template, System.Object[] args) [0x00000] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.TableExists (System.String schemaName, System.String tableName) [0x00000] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.VersionLoader.get_AlreadyCreatedVersionTable () [0x0001c] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.VersionLoader.LoadVersionInfo () [0x00028] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.VersionLoader..ctor (FluentMigrator.Runner.IMigrationRunner runner, FluentMigrator.Infrastructure.IAssemblyCollection assemblies, FluentMigrator.IMigrationConventions conventions) [0x00077] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.MigrationRunner..ctor (FluentMigrator.Infrastructure.IAssemblyCollection assemblies, FluentMigrator.Runner.Initialization.IRunnerContext runnerContext, FluentMigrator.IMigrationProcessor processor) [0x00175] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at FluentMigrator.Runner.MigrationRunner..ctor (System.Reflection.Assembly assembly, FluentMigrator.Runner.Initialization.IRunnerContext runnerContext, FluentMigrator.IMigrationProcessor processor) [0x00007] in <137fb96feee44f379d6a8fba4e172d1c>:0
  at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate (System.String connectionString, NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x000b5] in <4d3cc4e5f7ed4ed2814d83bdaf94809e>:0
  at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x00048] in <4d3cc4e5f7ed4ed2814d83bdaf94809e>:0

Fingers crossed it is all back to normal now :sunglasses:

And a reboot later, the 3 services are not starting up again and the same error as in the first post I did :cry:

I can see multiple errors in your logs: mono missing and corrupted database
I am not sure what else can be wrong, however if there is no issue with the hard disk, I’d suggest a clean install and restore from backup the settings.

Doesn’t seem to be issues with the hdd and even if I run the command

/opt/radarr/Radarr -nobrowser -data=/mnt/dietpi_userdata/radarr

it starts up without issue, just wont start from the dietpi-launcher.

Typically I just rebuilt everything last weekend as had issues :face_with_raised_eyebrow:

can you restart your system and check status of services

dietpi-services status

Let’s check them one by one

Thanks for getting back to me Joulinar, but it seems to have resolved itself by doing a reinstall command

dietpi-software reinstall <ID>

Which kept my settings / movies / tv / music so a happy chappy. A backup has also made :smiley:

The forum has been invaluable for me over the past couple of months as I discovered a new use for my Pi, so will be making a donation too :sunglasses:

glad to here it is working again :sunglasses:

Here a solution out end: https://github.com/MichaIng/DietPi/commit/5320442
The directories listed with this systemd setting need to exist. If a reinstall solved it, I guess the log directory did not exist, so the service would have failed anyway, but the error message would have been clearer.