V2 to v3 upgrade crashes


Sonarr version (exact version): v3.0.1.351
Mono version (if Sonarr is not running on Windows):
OS: Debian Stretch (4.9.88-1+deb9u1)
Debug logs: https://pastebin.com/jUWs0xJ2
Description of issue: After cleaning a corrupt v2 DB and importing it into v3, everything seemed fine. After troubleshooting permissions issues for a few hours here, Sonarr user should have full access to all directories it needs. I could browse all the directories via ‘add a new path’ in the web gui.

However it seems Sonarr throws a few NzbDrone.Common.Disk.DestinationAlreadyExistsException errors and crashes out of mono. Debian systemctl attempts to restart the service and the cycle starts over about every minute.

I am using a CIFS NAS to store all the episodes and had to force groupid on mount so that all users can access it.

Anyone come across this issue before?
My assumption is that I’m missing a permission setting someplace as I was running v2 just as a root user without issues; And have migrated using the Debian package install for v3.


That shouldn’t cause mono to crash, just prevent Sonarr from importing, possibly because it didn’t have permissions to delete the file on a previously failed import.

You’ll need to capture the standard output and error to a file to see exactly why it’s crashing.

Be aware that CIFS has issues with incomplete file transfers in some cases, NFS is recommended to avoid that.


I went and got all the STDOUT output.

I didn’t have media info installed because it seemed to be optional per the package install instructions.
I installed gdb per this first stack trace and the media info repo, and got a new error that seems to suggest mediainfo is the problem:



Did an apt update/apt upgrade and it upgraded mediainfo from the repo.
So far Sonarr has been chugging away at cleaning up the library for more than 10 minutes.

Thanks for pointing out the need to capture standard out. That’s really what solved this!


One issue still remains, the DestinationAlreadyExistsException keeps happening.

I’ve done some troubleshooting with starting a shell as the sonarr user and making a file with touch and echoing text into that file and then removing it. No issues. Permissions for the destination directory are a+rwx.

A packet capture of CIFS/SMB traffic to the NAS shows the directory traversal Sonarr is trying to get to and then nothing after the exception is thrown.

What’s interesting is that some files import fine with no issues, with others it throws this exception regardless of whether the episode exists or not already is trying to be imported.

Looking for suggestions to refocus my troubleshooting efforts here.



NZBGet was left running as root.
You can set the directory permissions all day, but if it keeps dropping files in as root, other users won’t be able to write or delete.

It was a fun lesson on permissions.
In the end I changed the umask in NZBGet until I can get around to running the service off of root properly.

closed #7

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.