Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

upstart & node.js app "stop: Unknown instance:"

I'm having a bit of trouble with upstart on ubuntu and a node.js app.

Everything was working fine with the upstart script. Start, stopping, status-ing, etc all worked as expected until I deployed new code. The changes weren't reflected in the running app. I reasoned that somehow the new code wasn't being loaded by stoping & starting the app.

I did a manual kill on the pid of the running daemon which is where I believe I went awry.

At the present moment, If I initctl list I see my app in the list:

mynodejs.app stop/waiting

When I start mynodejs.app it seems to start:

mynodejs.app start/running, process 16228

But, when try to stop it:

stop: Unknown instance:

And...

status mynodejs.app
mynodejs.app stop/waiting

...although the app is up and running.

like image 444
Tim W. Avatar asked Jan 17 '23 06:01

Tim W.


1 Answers

I'll answer my own question...

Restarting the init process cleared everything up.

sudo /sbin/telinit q

I needed to kill the rogue instance of my app. After that, using start and stop worked as expected.

like image 180
Tim W. Avatar answered Jan 19 '23 20:01

Tim W.