[Pacemaker] Frustrating fun with Pacemaker / CentOS / Apache

Paul Graydon paul at ehawaii.gov
Wed Feb 17 21:59:16 EST 2010

On 2/16/2010 1:04 PM, Angie T. Muhammad wrote:
> On Wed, Feb 17, 2010 at 12:21 AM, Paul Graydon <paul at ehawaii.gov 
> <mailto:paul at ehawaii.gov>> wrote:
>     On 2/16/2010 10:48 AM, Andrew Beekhof wrote:
>>     The first error doesn't concern me particularly, it's a known
>>     Apache bug
>>>     relating to the proxy module that doesn't actually break anything.  It's the
>>>     binding errors that are bothering me and presumably what is stopping
>>>     pacemaker from starting the service successfully.  Whats really odd about
>>>     that error is I can run "/etc/init.d/httpd start" quite happily myself and
>>>     it works.  There is absolutely nothing sitting listening on port 80 at all
>>>     for it to struggle with.  Occasionally it seems to start it but I've no idea
>>>     why it will succeed then when it fails in the large majority of the time.
>>>       Really wild stab in the dark, but is there a chance pacemaker is attempting
>>>     to start the httpd process multiple times?
>>     Unlikely, usually its caused by LSB services being told to start at boot time.
>     That was one of the earliest thoughts I had, sorry I meant to put
>     this in my first message:
>     # chkconfig --list httpd
>     httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
>  I suffered from the same problem as you do. It is always highly 
> recommended to use OCF modules written specifically for your service 
> rather than LSB. Aside of your stack (openAIS or Heartbeat), errors 
> will pop up when stopping httpd if you are using LSB..
> Example configuration:
> # crm configure primitive WebServer ocf:heartbeat:apache params 
> configfile=/etc/httpd/conf/httpd.conf 
> statusurl= op monitor interval=30s
> For the above example to work correctly, FIRST you have to do some 
> editing in httpd.conf:
> 1- Make your listen directive tied to the localhost (for testing):
> Listen <>
> 2- Enable viewing server status for localhost:
> <Location /server-status>
>     SetHandler server-status
>     Order deny,allow
>     Deny from all
>     Allow from
> </Location>
> 3- Enable extended status:
> ExtendedStatus On
> Other than this, pacemaker will try to request a page from your server 
> but never finds it, so it considers the server not responding. It 
> tries to kill it, and you end up with some zombie processes.

I started looking into this today to find out whether it was possible to 
use another URL for testing.  According to the heartbeat script you can 
specify the parameter statusurl and as long as it has a body and html 
tag on the page you test it should work.

So I thought I'd give it a try, but it failed.  Initially I assumed it 
was because I hadn't selected a page with the body and html tag (having 
not noticed that was a necessity) but even when against a page that has 
them it still failed.  Trying to execute the command it runs came up 
with a failure for me too, but it appears to be how all the arguments 
are presented to wget courtesy of "sh -c".

It's looking for a positive return from:

sh -c wget -O- -q -L http://whatever.url.youprovided | tr '\012' ' ' | 
grep -Ei "</ *body *>[[:space:]]*</ *html *>"

Problem is if you cut it down to just that first section:
sh -c wget -O- -q -L http://whatever.url.youprovided

it pops back and tells you
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

If you execute wget without using "sh -c" in front of it it sees the URL 
and parses it successfully.

Surrounding the wget string with ' marks, as in:
sh -c 'wget -O- -q -L http://whatever.url.youprovided '

I'm trying to figure out what other options are available.  Adding in ' 
marks on line 406 of the ocf heartbeat apache script breaks it!


Paul Graydon
Senior Systems Administrator
Hawaii Information Consortium
Internet Portal Partner with the Aloha state
808-695-4619 office
808-695-4618 fax
paul at ehawaii.gov
This email and any attachments are confidential.  If you
are not the intended recipient, you do not have permission
to disclose, copy, distribute, or open any attachments.  If
you have received this email in error, please notify us
immediately by returning it to the sender and delete this
copy from your system.

Thank you.
Hawaii Information Consortium, LLC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100217/e88196f2/attachment-0001.html>

More information about the Pacemaker mailing list