Abdulrazak-Alkl / activemessaging

Automatically exported from code.google.com/p/activemessaging
0 stars 0 forks source link

poller daemon script does not stop properly on RHEL ruby 1.8.5 #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Added in recent checkin the daemonized script/poller
Works well on mac osx, ruby 1.8.4

Tried it on RHEL using 1.8.5, and it mostly works, but the stop command
does not shut down the actual poller process.

The watcher process is stopped properly, and its pid fle deleted.

The poller pid file gets removed, so running 'script/poller status' tells
you it is down, but it isn't, 'ps -aef | grep poller' reveals it is still
running.

I have created simple scripts to try and reproduce, and runnpoller daemon
script does not stop properly on some platformsing these on the same
platform works - they stop properly.  So it is not that the daemon stuff is
broken entirely on this platform - it is something about what the poller is
doing.

I'll try and debug - I'll add ruby 1.8.5 locally and see if I can reproduce
- maybe it is not the os, its the ruby version.

The one thing I did notice is that the daemon stop command sends a 'TERM'
signal, not a full on kill (9).  Perhaps the ruby daemon could be enhanced
to include doing a kill -9 if the TERM command does not work after some
period of time?  I'll post something to the ruby daemon folks, see if they
have any ideas.

Original issue reported on code.google.com by kooks...@gmail.com on 19 Jan 2007 at 10:10

GoogleCodeExporter commented 8 years ago
Brought this problem to the good people of Contegix, who is hosting our app 
that uses
a13g.  I had tried adding sleep and trap statements, but Craig A. McElroy of 
Contegix
fixed this by adding a trap("TERM","EXIT") to the while loop in the poller.rb, 
and
now everything works great.  I'll be checking that in momentarily.

Original comment by kooks...@gmail.com on 20 Jan 2007 at 5:03

GoogleCodeExporter commented 8 years ago
BTW - this was a problem on both 1.8.4 and 1.8.5 on RHEL - the version of ruby 
was
not the issue.

Original comment by kooks...@gmail.com on 20 Jan 2007 at 5:04