radarr & sonarr - Import broken - file already exists

Hello,

First i’d like to say i’ve been loving dietpi and just donated, appreciate all you guys do!

I had a nice setup working, which recently broke for a reason I am trying to discover.

My setup: Dietpi on rpi4 with sabnzbd/radarr/sonarr/sshfs client —> Shieldpro/plex/sftp server (battled with smb for a while and lost due to mono6 https://github.com/MichaIng/DietPi/issues/3179 and cifs server on shield being unreliable). I am doing this because shieldpro seems to be a good plex server and watching large 4k HDR locally seems most reliable without network in the path.

While on dietpi 6.29, everything worked great for weeks. radarr would notify sabnzbd about an nzb, sabnzbd would download to /mnt/dietpi_userdata, radarr would move the file to /mnt/shieldproext (sshfs mount), radarr would import and know the movie was downloaded, radarr would remove the movie from sabnzbd (perfectly working Download Client “Completed Download Handling”)…Then something broke.

The problem: radarr (or sonarr) notifies sabnzbd, sabnzbd downloads, copies the file from /mnt/dietpi_userdata to /mnt/shieldproext, but then fails on import. Movie is stuck in radarr “activity queue”, stays in sabnzbd history, radarr still thinks the movie is missing. I initially get the first error below, then it is followed over and over repeatedly by the second error (they look similar but not exactly the same). I’ve tried trace log and see no additional logs except that radarr says that it is moving the file before these errors.

ImportApprovedMovie Couldn’t import movie /mnt/dietpi_userdata/downloads/complete/–.-.------.2020.HDR.2160p.WEB-DL.x265-ROCCaT/------085f80591113fe6a7b70------.mkv: The file ‘/mnt/shieldproext/Movies/-- - ------ (2020)/-- - ------ (2020) WEBDL-2160p.mkv’ already exists.

ImportApprovedMovie Couldn’t import movie /mnt/dietpi_userdata/downloads/complete/–.-.------.2020.HDR.2160p.WEB-DL.x265-ROCCaT/------085f80591113fe6a7b70------.mkv: Destination already exists [/mnt/shieldproext/Movies/-- - ------ (2020)/-- - ------ (2020) WEBDL-2160p.mkv]
ImportApprovedMovie Couldn’t import movie /mnt/dietpi_userdata/downloads/complete/–.-.------.2020.HDR.2160p.WEB-DL.x265-ROCCaT/------085f80591113fe6a7b70------.mkv: Destination already exists [/mnt/shieldproext/Movies/-- - ------ (2020)/-- - ------ (2020) WEBDL-2160p.mkv]
ImportApprovedMovie Couldn’t import movie /mnt/dietpi_userdata/downloads/complete/–.-.------.2020.HDR.2160p.WEB-DL.x265-ROCCaT/------085f80591113fe6a7b70------.mkv: Destination already exists [/mnt/shieldproext/Movies/-- - ------ (2020)/-- - ------ (2020) WEBDL-2160p.mkv]

What changed: ssh server on shield took an update to 0.6.6, but i have a second shield still on 0.6.5 that fails the same way. radarr took an update to 0.2.0.1504 - Jul 3 2020, but sonarr is still on 2.0.0.5344 - Mar 13 2020 and fails the same way. Plex server update on shield perhaps. Which leads me to the dietpi update from 6.29 to 6.31.2, which i am now trying to rule out.

Troubleshooting I have tried: if i tell radarr to download to /mnt/dietpi_userdata/Video (local sd on dietpi, not over sshfs) it works fine. tried trace logging with no additional log entries that help. added an older shield with the same issue. tried sonarr and have the same issue. finally tried many hail mary reboots : (

At my wits end, i just don’t understand how i had this working perfectly and it broke. Any help would be greatly appreciated. Thanks!

Crazy how nobody replied. I think i have to move off dietpi and over to doing what I need with containers. Since hotio and other containers use mono 5.20 which is much more radarr/sonarr friendly. Thanks anyway.

Sorry for the missing reply. Yes the mono 6 issue is a pain indeed and for months there has been no progress to fix it: https://github.com/mono/mono/issues/16573
You could move to Sonarr v3 btw which works around the issue: https://sonarr.tv/#downloads-v3-linux
Not sure about Radarr, but I think they have a workaround in their stable version already?

However now you have sshfs which should not work that much worse. The dietpi-update itself should not be related since we didn’t touch installs of the related programs, but APT package upgrades could play a role. To rule out the dietpi-update itself (excluding APT upgrade), if you have a backup, is to do apt update && apt upgrade, check if any possibly related upgrades are done that you didn’t rule out already (like mono or sshfs or openssh-client?).

However it looks quite specific where Radarr imports the file but somehow is not able to verify/update its information about it and tries the same again and again. Indeed the error messages changed from “file already exists” to “destination already exists”, so obviously this happens on different places in code, in the first case a first check succeeded and then a second check failed, in the following cases the first check failed directly or such. Did you check on the SSH server if the file has been transferred correctly, permissions are as they should be etc?

And probably you can increase log verbosity of Radarr and/or sshfs. Probably dmesg -n8 may help debug to have maximum kernel log verbosity, then run dmesg | tail -10 to check for kernel messages. And journalctl -r is always good to check last syslog entries about what happened around matching timestamps.