When I try to start Sonarr on my freebsd home server I get this error:
15-6-4 18:33:35.4|Info|Bootstrap|Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.3154
15-6-4 18:33:35.7|Error|PidFileProvider|Unable to write PID file: /home/nzbdrone/.config/NzbDrone/nzbdrone.pid
15-6-4 18:33:35.7|Fatal|ConsoleApp|EPIC FAIL!
System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x000b0] in /usr/ports/lang/mono/work/mono-4.0.1/mcs/class/System/System.Diagnostics/Process.cs:573
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at NzbDrone.Common.Processes.ProcessProvider.ConvertToProcessInfo (System.Diagnostics.Process process) [0x0002c] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Processes\ProcessProvider.cs:260
at NzbDrone.Common.Processes.ProcessProvider.GetCurrentProcess () [0x00000] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Processes\ProcessProvider.cs:45
at NzbDrone.Common.Processes.PidFileProvider.Write () [0x0001e] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Processes\PidFileProvider.cs:36
Here is someone who had the same error with an older version:
It is the same exception in the same system function ( System.Diagnostics.Process.get_ProcessName () ) as in the thread but with another stack trace. Maybe you forgot to apply your workaround in all places?
Freebsd 10.1-RELEASE-p10 on amd64
Sonarr 2.0.0.3154
Mono 4.0.1 (current version in ports)
I already opened an issue on github because I thought this were the place to report this.
These are two very different issues, the other one was us starting another process and gathering info from it, in your case Sonarr is getting an error saying its own process has exited.
ID: 38094
Unhandled Exception:
System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x000b0] in /usr/ports/lang/mono/work/mono-4.0.1/mcs/class/System/System.Diagnostics/Process.cs:573
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at ProcessTest.Program.Main (System.String[] args) [0x0001d] in c:\Dropbox\Dev\Test\ProcessTest\ProcessTest\Program.cs:14
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x000b0] in /usr/ports/lang/mono/work/mono-4.0.1/mcs/class/System/System.Diagnostics/Process.cs:573
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at ProcessTest.Program.Main (System.String[] args) [0x0001d] in c:\Dropbox\Dev\Test\ProcessTest\ProcessTest\Program.cs:14
If you want I can provide you with a user account so you can test yourself via ssh.
Thanks, I don’t think thats necessary, but this does throw a wrench into the mix, getting the ID (where its failing) can be avoided, thats not too hard to solve, but I’m worried that there are other cases where Sonarr tries to get information for a process and it will fail in the same way. I’ll take a look at fixing this particular cause of the error, but it still leaves a question mark whether other things will die.