[Linux-HA] Re: start-delay for monitor operation not implemented?
Eddie C
edlinuxguru at gmail.com
Sat Oct 21 16:11:20 MDT 2006
The Tomcat stop operation also suffers from the same side effect. On windows
systems I have written things like:
tomcat stop
del $work_dir
tomcat start
Del failed due to java/tomcat/windows slowly releasing its file locks on the
work directory.
I would suggest using both solutions, a delay 'sleep 5' plus some advanced
checking. This way when the checking happens you can be at least sure its
checking something in a consistant state not a half way closed or started
app.
On 10/20/06, Dejan Muhamedagic <dejanmm at fastmail.fm> wrote:
>
> On Fri, Oct 20, 2006 at 10:39:26AM +1300, Stephen Souness wrote:
> > Dejan Muhamedagic wrote:
> > >On Thu, Oct 19, 2006 at 01:16:46PM +0200, Andrew Beekhof wrote:
> > >>On 10/19/06, Stephen Souness <sounie at hotmail.com> wrote:
> > >>>[ Snip ]
> > >>>
> > >>>Is there a short answer to the question of whether or not heartbeat
> v2's
> > >>>monitor operation utilizes start-delay?
> > >>>
> > >>>I have an OCF script which starts Tomcat, but Tomcat has not finished
> > >>>its start-up sequence by the time heartbeat calls the OCF script with
> > >>>"monitor".
> > >>then your RA is broken. it should not report "success" until it is
> > >>actually succeeded.
> > >>
> > >>regardless of anything else, this is your biggest problem.
> >
> > I was being a bit lazy and letting the first monitor call would do the
> > checking for me, but you're right.
> >
> > I'll modify my script so that it will check that the application is
> > actually successfully started before returning.
> >
> > >
> > >Right. However, for some resources, it's really hard to say when
> > >they are actually finished the initialization. Tomcat probably
> > >belongs to the group. Not an expert on java, but probably the only
> > >way to establish that it is really running is to try to use it
> > >through a web interface. Some time ago, I posted a scheme on how
> > >to do this, but so far there were no takers to test it.
> > >
> >
> > I'll probably end up with a loop checking the result of a call to wget
> > on a known URL for checking a successful start. If I'm feeling pedantic
> > then I may add a check to ensure that the Tomcat process is actually
> > running as well.
> >
> >
> > Can you re-post the scheme, or refer me to an archive of your post?
>
> http://marc.theaimsgroup.com/?l=linux-ha&m=115798174225569&w=2
>
> >
> >
> > --
> > Stephen
> >
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA at lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
More information about the Linux-HA
mailing list