On Thu, Jan 8, 2009 at 2:34 PM, Karl W. Lewis <[email protected]>wrote:
> > > On Thu, Jan 8, 2009 at 1:30 PM, Thomas Mueller <[email protected]>wrote: > >> On Thu, 08 Jan 2009 10:26:27 -0500, Karl W. Lewis wrote: >> >> > I'm trying to create a three-node cluster of servers running Apache and >> > Tomcat. I *think* that because the Apache server runs only https the >> > heartbeat apache script will start Apache but never detects that it has >> > succeeded. I can use the lsb apache script, but then monitoring it >> > becomes an issue. Can anyone point me to a sample config that I might >> > shamelessly steal? Or suggest a way to enable heartbeat t omonitor my >> > Apache server? >> >> think you should at least post your config of the apache resource. >> mentioning the version of heartbeat and some log output would also not >> hurt. >> >> - Thomas >> >> _______________________________________________ >> Linux-HA mailing list >> [email protected] >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> See also: http://linux-ha.org/ReportingProblems >> > > > Oh. Right. > > I'm using heartbeat-2.1.3-3.el5.centos on a redhat 5, i386 system. > > Trying to use ocf: > > <resources> > <primitive id="WebServerApache" class="ocf" type="apache" > provider="heartbeat"> > <operations> > <op id="WebServerApache_Mon" interval="60s" name="monitor" > timeout="120s"/> > </operations> > <instance_attributes id="WebServerApache_inst_attr"> > <attributes> > <nvpair id="apache_status" name="target_role" > value="started"/> > <nvpair id="apahce_config" name="apache_config" > value="/etc/httpd/conf/httpd.conf"/> > </attributes> > </instance_attributes> > </primitive> > </resources> > > This starts the webserver, but believes that it has failed; mostly, I > think, because it will never be able to find the "status" page that the ocf > apache script wants to find. (This server has a re-write rule that remaps > the url the the https address, regardless of how the user's browser got them > to the site.) I tried fiddling with the ocf apache script some, but all I > managed to do was break it. > > Using just lsb: > > <resources> > <primitive id="WebServerApache" class="lsb" type="httpd" > > </primitive> > </resources> > > This starts the web server, but I'm not sure how to make heartbeat monitor > it, then. > > I understand that my question is ill-formed. I've watched a couple of the > video presentations and read through the slide shows, but I've been looking > for more definitive documentation and haven't been able to find it. I > understand O'Reilly Germany has a book on HeartBeat v2, but ignorant > U.S.-ian that I am, I can't hope to translate that, myself. > > Karl > > > > > > > Oh, and now that you've made me look at them... the logs may well contain the answer to my troubles, or at least the key to a solution. In relevant part the logs say this: crmd[11077]: 2008/12/27_13:08:14 info: G_main_add_SignalHandler: Added signal handler for signal 17 mgmtd[11078]: 2008/12/27_13:08:14 info: G_main_add_SignalHandler: Added signal handler for signal 12 cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <primitive id="WebServerApache" class="ocf" type="apache" provider="heartbeat"> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <instance_attributes id="WebServerApache_inst_attr"> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <attributes> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <nvpair id="WebServerApache_config" name="apache_config" value="/etc/httpd/conf/httpd.conf"/> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <nvpair id="Apache_status" name="target_role" value="started"/> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] </attributes> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] </instance_attributes> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] </primitive> cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] </resources> lrmd[11074]: 2008/12/27_13:08:14 info: G_main_add_SignalHandler: Added signal handler for signal 17 cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <constraints/> lrmd[11074]: 2008/12/27_13:08:14 info: G_main_add_SignalHandler: Added signal handler for signal 10 cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] </configuration> ccm[11072]: 2008/12/27_13:08:14 info: G_main_add_SignalHandler: Added signal handler for signal 15 lrmd[11074]: 2008/12/27_13:08:14 info: G_main_add_SignalHandler: Added signal handler for signal 12 cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] <status/> lrmd[11074]: 2008/12/27_13:08:14 info: Started. cib[11073]: 2008/12/27_13:08:14 info: log_data_element: readCibXmlFile: [on-disk] </cib> mgmtd[11078]: 2008/12/27_13:08:14 info: init_crm mgmtd[11078]: 2008/12/27_13:08:14 info: login to cib: 0, ret:-10 [...] crmd[11077]: 2008/12/27_13:08:52 info: do_state_transition: State transition S_PENDING -> S_NOT_DC [ input=I_NOT_DC cause=C_HA_MESSAGE origin=do_cl_join_finalize_respond ] crmd[11077]: 2008/12/27_13:08:53 info: do_lrm_rsc_op: Performing op=WebServerApache_monitor_0 key=7:0:e4fc23e6-92ab-4683-99ba-df387c448e32) lrmd[11074]: 2008/12/27_13:08:53 info: rsc:WebServerApache: monitor crmd[11077]: 2008/12/27_13:08:53 info: process_lrm_event: LRM operation WebServerApache_monitor_0 (call=2, rc=7) complete heartbeat[11062]: 2008/12/27_13:08:54 WARN: 1 lost packet(s) for [ host-207.domain.com] [103:105] heartbeat[11062]: 2008/12/27_13:08:54 info: No pkts missing from host-207.domain.com! crmd[11077]: 2008/12/27_13:09:16 info: do_lrm_rsc_op: Performing op=WebServerApache_start_0 key=7:3:e4fc23e6-92ab-4683-99ba-df387c448e32) lrmd[11074]: 2008/12/27_13:09:16 info: rsc:WebServerApache: start apache[11106][11114]: 2008/12/27_13:09:16 ERROR: Cannot parse config file [/etc/apache2/httpd.conf] There is no /etc/apache2/httpd.conf for it to find and parse. So that is coded somewhere, and I'll need to track that down and start again. Karl _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
