2.0.0.1132 fails epically on freebsd

Complete output:

-> % mono NzbDrone.exe
[Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.1132
[Info] ps: Starting ps --pid 6060 -o args=

[Fatal] ConsoleApp: EPIC FAIL!

System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at NzbDrone.Common.Processes.ProcessProvider.WaitForExit (System.Diagnostics.Process process) [0x00000] in :0
at NzbDrone.Common.Processes.ProcessProvider.StartAndCapture (System.String path, System.String args) [0x00000] in :0
at NzbDrone.Mono.NzbDroneProcessProvider.b__0 (NzbDrone.Common.Model.ProcessInfo c) [0x00000] in :0
at System.Linq.Enumerable+c__Iterator331[NzbDrone.Common.Model.ProcessInfo].MoveNext () [0x00000] in <filename unknown>:0 at System.Collections.Generic.List1[NzbDrone.Common.Model.ProcessInfo].AddEnumerable (IEnumerable1 enumerable) [0x00000] in <filename unknown>:0 at System.Collections.Generic.List1[NzbDrone.Common.Model.ProcessInfo]…ctor (IEnumerable1 collection) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToList[ProcessInfo] (IEnumerable1 source) [0x00000] in :0
at NzbDrone.Mono.NzbDroneProcessProvider.FindNzbDroneProcesses () [0x00000] in :0
at NzbDrone.Host.SingleInstancePolicy.GetOtherNzbDroneProcessIds () [0x00000] in :0
at NzbDrone.Host.SingleInstancePolicy.IsAlreadyRunning () [0x00000] in :0
at NzbDrone.Host.SingleInstancePolicy.PreventStartIfAlreadyRunning () [0x00000] in :0
at NzbDrone.Host.Bootstrap.EnsureSingleInstance (Boolean isService, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, IUserAlert userAlert, System.Action`1 startCallback) [0x00000] in :0
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00000] in :0

Press any key to exit…
[Error] ps: ps: illegal option – -
[Error] ps: usage: ps [-aCcdefHhjlmrSTuvwXxZ] [-O fmt | -o fmt] [-G gid[,gid…]]
[Error] ps: [-M core] [-N system]
[Error] ps: [-p pid[,pid…]] [-t tty[,tty…]] [-U user[,user…]]
[Error] ps: ps [-L]

Its failing during the ps command drone runs on start-up to support restarting.

Apparently: ps --pid XX -o args= is not supported, could you try ps -pid XX -o args= where XX is a valid PID for a running application?

Could you also try ps -p XX -o args= - again with a valid PID.

Shouldn’t be too difficult to resolve, just need to find a solution that works for FreeBSD (and other OSes, hopefully).

tom@down [04:40:05] [/opt/NzbDrone]
-> % ps --pid 5027 -o args=
ps: illegal option – -
usage: ps [-aCcdefHhjlmrSTuvwXxZ] [-O fmt | -o fmt] [-G gid[,gid…]]
[-M core] [-N system]
[-p pid[,pid…]] [-t tty[,tty…]] [-U user[,user…]]
ps [-L]
tom@down [04:40:20] [/opt/NzbDrone]
-> % ps -pid 5027 -o args=
ps: Invalid process id: id
ps: illegal argument: -o
usage: ps [-aCcdefHhjlmrSTuvwXxZ] [-O fmt | -o fmt] [-G gid[,gid…]]
[-M core] [-N system]
[-p pid[,pid…]] [-t tty[,tty…]] [-U user[,user…]]
ps [-L]
tom@down [04:40:37] [/opt/NzbDrone]
-> % ps -p 5027 -o args=
/usr/local/bin/atop -w /var/log/atop/atop_20140213 10
tom@down [04:40:40] [/opt/NzbDrone]
-> %

Thanks, can you try out 2.0.0.1133, it will use ps -p XX -o args= which also works on Ubuntu, hopefully its more compatible.

[Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.1133
[Info] ps: Starting ps -p 40684 -o args=

[Fatal] ConsoleApp: EPIC FAIL!

System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at NzbDrone.Common.Processes.ProcessProvider.WaitForExit (System.Diagnostics.Process process) [0x00000] in :0
at NzbDrone.Common.Processes.ProcessProvider.StartAndCapture (System.String path, System.String args) [0x00000] in :0
at NzbDrone.Mono.NzbDroneProcessProvider.b__0 (NzbDrone.Common.Model.ProcessInfo c) [0x00000] in :0
at System.Linq.Enumerable+c__Iterator331[NzbDrone.Common.Model.ProcessInfo].MoveNext () [0x00000] in <filename unknown>:0 at System.Collections.Generic.List1[NzbDrone.Common.Model.ProcessInfo].AddEnumerable (IEnumerable1 enumerable) [0x00000] in <filename unknown>:0 at System.Collections.Generic.List1[NzbDrone.Common.Model.ProcessInfo]…ctor (IEnumerable1 collection) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToList[ProcessInfo] (IEnumerable1 source) [0x00000] in :0
at NzbDrone.Mono.NzbDroneProcessProvider.FindNzbDroneProcesses () [0x00000] in :0
at NzbDrone.Host.SingleInstancePolicy.GetOtherNzbDroneProcessIds () [0x00000] in :0
at NzbDrone.Host.SingleInstancePolicy.IsAlreadyRunning () [0x00000] in :0
at NzbDrone.Host.SingleInstancePolicy.PreventStartIfAlreadyRunning () [0x00000] in :0
at NzbDrone.Host.Bootstrap.EnsureSingleInstance (Boolean isService, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, IUserAlert userAlert, System.Action`1 startCallback) [0x00000] in :0
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00000] in :0

Press any key to exit…

Well then. Could you try running mono --debug NzbDrone (it will give some more debugging information).

-> % mono --debug NzbDrone.exe
[Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.1133
[Info] ps: Starting ps -p 40942 -o args=

[Fatal] ConsoleApp: EPIC FAIL!

System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x000b0] in /wrkdirs/usr/ports/lang/mono/work/mono-3.2.3/mcs/class/System/System.Diagnostics/Process.cs:574
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at NzbDrone.Common.Processes.ProcessProvider.WaitForExit (System.Diagnostics.Process process) [0x00000] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Common\Processes\ProcessProvider.cs:191
at NzbDrone.Common.Processes.ProcessProvider.StartAndCapture (System.String path, System.String args) [0x00032] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Common\Processes\ProcessProvider.cs:184
at NzbDrone.Mono.NzbDroneProcessProvider.b__0 (NzbDrone.Common.Model.ProcessInfo c) [0x00000] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Mono\zbDroneProcessProvider.cs:24
at System.Linq.Enumerable+c__Iterator331[NzbDrone.Common.Model.ProcessInfo].MoveNext () [0x00059] in /wrkdirs/usr/ports/lang/mono/work/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:3119 at System.Collections.Generic.List1[NzbDrone.Common.Model.ProcessInfo].AddEnumerable (IEnumerable1 enumerable) [0x00013] in /wrkdirs/usr/ports/lang/mono/work/mono-3.2.3/mcs/class/corlib/System.Collections.Generic/List.cs:134 at System.Collections.Generic.List1[NzbDrone.Common.Model.ProcessInfo]…ctor (IEnumerable1 collection) [0x0002f] in /wrkdirs/usr/ports/lang/mono/work/mono-3.2.3/mcs/class/corlib/System.Collections.Generic/List.cs:69 at System.Linq.Enumerable.ToList[ProcessInfo] (IEnumerable1 source) [0x00006] in /wrkdirs/usr/ports/lang/mono/work/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:2951
at NzbDrone.Mono.NzbDroneProcessProvider.FindNzbDroneProcesses () [0x00011] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Mono\zbDroneProcessProvider.cs:22
at NzbDrone.Host.SingleInstancePolicy.GetOtherNzbDroneProcessIds () [0x00011] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Host\SingleInstancePolicy.cs:59
at NzbDrone.Host.SingleInstancePolicy.IsAlreadyRunning () [0x00000] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Host\SingleInstancePolicy.cs:53
at NzbDrone.Host.SingleInstancePolicy.PreventStartIfAlreadyRunning () [0x00000] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Host\SingleInstancePolicy.cs:35
at NzbDrone.Host.Bootstrap.EnsureSingleInstance (Boolean isService, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x0002e] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Host\Bootstrap.cs:98
at NzbDrone.Host.Bootstrap.Start (ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x00008] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Host\Bootstrap.cs:62
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, IUserAlert userAlert, System.Action`1 startCallback) [0x00064] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Host\Bootstrap.cs:39
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x0000f] in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Console\ConsoleApp.cs:19

Press any key to exit…

What version of FreeBSD and mono are you running? I’d like to do some testing if we can sort this out easily.

I pushed 2.0.0.1135 with another small fix towards getting this working again.

1135 has the same error.

I’m using freenas 9.2.1, based on freebsd 9.2-release. mono is 3.2.3

Oh, and the last version I had worked perfectly. But of course I don’t remember the version name, and the tar.gz-files aren’t on the server. I think it would have been about four days old, though, so it’s not exactly ancient.

Okay, I’ll do some more investigating.

2.0.0.1121 is the latest version that doesn’t have this issue.

Can you put that on the server so I can use that until the new version fixes it? The tar.gz I mean.

Ahh right, forgot they aren’t on the server, you can grab it here: https://dl.dropboxusercontent.com/u/10424245/NzbDrone.develop.2.0.0.1121.tar.gz

Thanks. If you need more help with debugging, contact me. I’ll set up an account on my freenas for you, so you can go wild.

Trying to setup a VM for testing, but having issues installing any package via pkg install I always get:

Updating repository catalogue No valid repository found.

I assume I need to add one, but not sure how/which one to add. I see the mono package here: https://www.freshports.org/lang/mono/ but my google fu has not found me a solution.

Any luck with testing or a fix?

@raidflex I haven’t tried playing with it again, I was still stuck on the pkg install.

Did you do pkg update?

And apparently this is a thing:
To get pkgng working you must first configure a PACKAGESITE in /usr/local/etc/pkg.conf, or you will get an error like this:

pkg update

pkg: Invalid configuration format, ignoring the configuration file
Updating repository catalogue
pkg: PACKAGESITE is not defined.
file: /usr/local/etc/pkg.conf

cat /usr/local/etc/pkg.conf

PACKAGESITE: http://pkgbeta.freebsd.org/freebsd-9-amd64/latest
In the near future this value will be set automatically.

Thanks @tofagerl that was the issue, had to use the PACKAGESITE: http://pkgbeta.freebsd.org/freebsd:9:x86:32/latest/ but otherwise its working great.

Should be good in 2.0.0.1153, but let me know if you still have issues.