jgallen23 / mongroup

Monitor a group of processes with mon
186 stars 15 forks source link

Not able to control the process in the example using mongroup #19

Open sahilsk opened 10 years ago

sahilsk commented 10 years ago

I used the default example to perform following action

cd example

Edited mongroup.conf file to provide pid and log directory

Started the mongroup inside example folder mongroup start >> All 5 instances launched mongroup stop >> All 5 instances stopped.

mongroup restart >> All 5 instances restarted.

Now i kill web2 instance using : ps -ef , kill PID_FOUND Here mongroup try to restart the process but couldn't Here is the web2.log file output

---==================== Error: listen EADDRINUSE at errnoException (net.js:646:11) at Array.0 (net.js:747:26) at EventEmitter._tickCallback (node.js:192:41) [ 'node', '/home/vagrant/mongroup/example/alert.js', 'restart', 'web2', '27120' ] Server running at http://127.0.0.1:8002/

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: listen EADDRINUSE at errnoException (net.js:646:11) at Array.0 (net.js:747:26) at EventEmitter._tickCallback (node.js:192:41) [ 'node', '/home/vagrant/mongroup/example/alert.js', 'restart', 'web2', '27154' ] Server running at http://127.0.0.1:8002/

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: listen EADDRINUSE at errnoException (net.js:646:11) at Array.0 (net.js:747:26) at EventEmitter._tickCallback (node.js:192:41) root@vagrant-ubuntu-precise-64:/home/vagrant/mongroup/example#

--=====================

After 4 tries mongroup failed to start this process. If mongroup not restarting process then how come web2 is still online and why mongroup looses track of this process? mongroup stop/start looses control over this process. Kindly pardon my ignorance and help me debug this.

jgallen23 commented 10 years ago

which pid did you kill? the web2.mon.pid or web2.pid?

There is a shortcut to restarting a specific process: mongroup restart web2 does that work for you?