[Pacemaker] Odd issues with apache on RHEL 7 beta
Hi all, I'm walking through the pcs cluster from scratch on RHEL 7 beta. I've run into a couple issues and I can't tell if they're issues or just oversites on my part. 1. If httpd is running, pacemaker thinks it is not and can not start it. It shows: Dec 27 01:11:38 an-c03n02 apache(Website)[11412]: INFO: apache not running Dec 27 01:11:38 an-c03n02 apache(Website)[11412]: INFO: waiting for apache /etc/httpd/conf/httpd.conf to come up Until it fails over to the other node, which then shows the same thing until it fails back. If I systemctl stop httpd.service and then let pacemaker start it, it works mostly. 2. If pacemaker starts httpd, it prints errors in syslog: Dec 27 01:26:08 an-c03n01 systemd: pacemaker.service: Got notification message from PID 13193, but reception only permitted for PID 1965 Dec 27 01:26:18 an-c03n01 systemd: pacemaker.service: Got notification message from PID 13193, but reception only permitted for PID 1965 [root@an-c03n01 ~]# cat /proc/13193/status |grep Name Name: httpd [root@an-c03n01 ~]# cat /proc/1965/status |grep Name Name: pacemakerd Apache does start though: lynx http://127.0.0.1/server-status Apache Server Status for 127.0.0.1 (via 127.0.0.1) Server Version: Apache/2.4.6 (Red Hat) Server MPM: prefork Server Built: Nov 1 2013 02:51:26 Current Time: Friday, 27-Dec-2013 01:30:10 EST Restart Time: Friday, 27-Dec-2013 01:25:59 EST Parent Server Config. Generation: 1 Parent Server MPM Generation: 0 Server uptime: 4 minutes 10 seconds Server load: 0.00 0.03 0.05 Total accesses: 10 - Total Traffic: 37 kB CPU Usage: u0 s0 cu0 cs0 .04 requests/sec - 151 B/second - 3788 B/request 1 requests currently being processed, 4 idle workers W... Scoreboard Key: _ Waiting for Connection, S Starting up, R Reading Request, W Sending Reply, K Keepalive (read), D DNS Lookup, C Closing connection, L Logging, G Gracefully finishing, I Idle cleanup of worker, . Open slot with no current process Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request 0-0 13196 0/2/2 W 0.00 0 0 0.0 0.01 0.01 127.0.0.1 an-c03n01.alteeve.ca:80 GET /server-status 3. I know I mentioned this on IRC before, but I thought I should mention it here again. In the pcs CfS, it shows to set: Location /server-status SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 /Location But then in the resource setup, it says: pcs resource create WebSite ocf:heartbeat:apache \ configfile=/etc/httpd/conf/httpd.conf \ statusurl=http://localhost/server-status; op monitor interval=1min This fails because apache will not respond to 'localhost', so you need to set 'statusurl=http://127.0.0.1/server-status; (or change the apache directive to 'Allow from localhost'). So did I screw something up (specially re: #2), or is this a genuine issue? Thanks! -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education? ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [Pacemaker] Odd issues with apache on RHEL 7 beta
27.12.2013 09:34, Digimer wrote: ... 3. I know I mentioned this on IRC before, but I thought I should mention it here again. In the pcs CfS, it shows to set: Location /server-status SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 /Location But then in the resource setup, it says: pcs resource create WebSite ocf:heartbeat:apache \ configfile=/etc/httpd/conf/httpd.conf \ statusurl=http://localhost/server-status; op monitor interval=1min This fails because apache will not respond to 'localhost', so you need to set 'statusurl=http://127.0.0.1/server-status; (or change the apache directive to 'Allow from localhost'). Just a side note on this. It may be caused by 'localhost' resolve default to IPv6 localhost address. ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [Pacemaker] Odd issues with apache on RHEL 7 beta
On 27/12/13 01:44 AM, Vladislav Bogdanov wrote: 27.12.2013 09:34, Digimer wrote: ... 3. I know I mentioned this on IRC before, but I thought I should mention it here again. In the pcs CfS, it shows to set: Location /server-status SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 /Location But then in the resource setup, it says: pcs resource create WebSite ocf:heartbeat:apache \ configfile=/etc/httpd/conf/httpd.conf \ statusurl=http://localhost/server-status; op monitor interval=1min This fails because apache will not respond to 'localhost', so you need to set 'statusurl=http://127.0.0.1/server-status; (or change the apache directive to 'Allow from localhost'). Just a side note on this. It may be caused by 'localhost' resolve default to IPv6 localhost address. In my case, this is not so. 'localhost' resolves to '127.0.0.1': [root@an-c03n01 ~]# gethostip -d localhost 127.0.0.1 Cheers! -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education? ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [Pacemaker] Odd issues with apache on RHEL 7 beta
27.12.2013 09:45, Digimer wrote: On 27/12/13 01:44 AM, Vladislav Bogdanov wrote: 27.12.2013 09:34, Digimer wrote: ... 3. I know I mentioned this on IRC before, but I thought I should mention it here again. In the pcs CfS, it shows to set: Location /server-status SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 /Location But then in the resource setup, it says: pcs resource create WebSite ocf:heartbeat:apache \ configfile=/etc/httpd/conf/httpd.conf \ statusurl=http://localhost/server-status; op monitor interval=1min This fails because apache will not respond to 'localhost', so you need to set 'statusurl=http://127.0.0.1/server-status; (or change the apache directive to 'Allow from localhost'). Just a side note on this. It may be caused by 'localhost' resolve default to IPv6 localhost address. In my case, this is not so. 'localhost' resolves to '127.0.0.1': [root@an-c03n01 ~]# gethostip -d localhost 127.0.0.1 Hmm... I still think that _could_ be the source (or part of it) of the issue. Below is run on a f18 system. $ host -a localhost. Trying localhost ;; -HEADER- opcode: QUERY, status: NOERROR, id: 28983 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;localhost. IN ANY ;; ANSWER SECTION: localhost. 0 IN A 127.0.0.1 localhost. 0 IN ::1 And (http_mon.sh uses wget by default): $ wget http://localhost/ --2013-12-27 09:55:29-- http://localhost/ Resolving localhost (localhost)... ::1, 127.0.0.1 Connecting to localhost (localhost)|::1|:80... failed: Connection refused. Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused. It first tries IPv6. curl (second http_mon.sh option) tries IPv6 first too: $ curl -v http://localhost/ * About to connect() to localhost port 80 (#0) * Trying ::1... * Connection refused * Trying 127.0.0.1... * Connection refused * couldn't connect to host * Closing connection #0 curl: (7) couldn't connect to host In your setup apache is probably listening on both localhost addresses, thus first connection attempt succeeds and it (apache) returns 403 Forbidden, preventing wget(curl) from trying IPv4 address. If apache listens only on 127.0.0.1 but not on ::1, then monitoring would succeed. ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org