Nzbdrone main process ended, respawning

Ubuntu: 14.04, Sonarr Development Branch: 2.0.0.2172, Mono:3.6

I’m seeing “init: nzbdrone main process ended, respawning” in my syslog, reported by the kernel pretty much once a second right now.

NZBDrone logs are filled with:

14-10-30 17:43:08.5|Info|Bootstrap|Application is being terminated. Reason : Another instance is already running
14-10-30 17:43:08.8|Info|Bootstrap|Starting NzbDrone - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.2177
14-10-30 17:43:09.7|Debug|ProcessProvider|Found 0 processes with the name: NzbDrone.Console
14-10-30 17:43:10.3|Debug|ProcessProvider|Found 2 processes with the name: NzbDrone
14-10-30 17:43:10.3|Info|SingleInstancePolicy|1 instance(s) of NzbDrone are running
14-10-30 17:43:10.3|Warn|SingleInstancePolicy|Another instance of NzbDrone is already running.
14-10-30 17:43:10.3|Debug|BrowserService|non-interactive runtime. Won't attempt to open browser.
14-10-30 17:43:10.3|Info|Bootstrap|Application is being terminated. Reason : Another instance is already running
14-10-30 17:43:10.6|Info|Bootstrap|Starting NzbDrone - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.2177
14-10-30 17:43:11.5|Debug|ProcessProvider|Found 0 processes with the name: NzbDrone.Console
14-10-30 17:43:12.1|Debug|ProcessProvider|Found 2 processes with the name: NzbDrone
14-10-30 17:43:12.2|Info|SingleInstancePolicy|1 instance(s) of NzbDrone are running

Any ideas what might be causing it?

14-10-30 17:43:10.3|Debug|ProcessProvider|Found 2 processes with the name: NzbDrone
14-10-30 17:43:10.3|Info|SingleInstancePolicy|1 instance(s) of NzbDrone are running

and

14-10-30 17:43:10.3|Info|Bootstrap|Application is being terminated. Reason : Another instance is already running

You have two instances running, kill them both and start the service up.

This was, of course, the solution, but leads me to wonder why two instances of NZBDrone are being started at boot on my server. One is definitely being started by upstart, but the other? No idea - I’ll need to do some searching. Thanks.

OK, this is happening when Sonarr does an automatic update.

upstart creates:

john@MediaServer /etc % sudo start nzbdrone
nzbdrone start/running, process 24304
john@MediaServer /etc % ps -ef | grep rone
john     24304     1 99 16:12 ?        00:00:01 mono /opt/NzbDrone/NzbDrone.exe

After an automatic update (branch: develop, mechanism: Built-In) I’m left with:

john@MediaServer /etc % ps -ef | grep rone
john     19968     1  9 16:07 ?        00:00:12 /usr/local/bin/mono /opt/NzbDrone/NzbDrone.exe --nobrowser
john     24304     1 99 16:09 ?        00:00:01 mono /opt/NzbDrone/NzbDrone.exe

Try disabling respawn in the upstart config. There is some more info in this thread:

OK, I’ve commented out:

 respawn

in /etc/init/nzbdrone.conf and restarted the service under upstart so that should be the state now. I’ll confirm what happens after the next update.

With the update overnight to 2.0.0.2183, I didn’t get a second instance of NZBDrone running, so it definitely looks like the respawn configuration command was the issue. (I note it’s already commented out on the wiki…)

Thanks, as always, for your time Markus…