[ClusterLabs] WebSite_start_0 on node2 'error' (1): call=6, status='complete', exitreason='Failed to access httpd status page.'

Reid Wahl nwahl at redhat.com
Sun Mar 21 16:41:45 EDT 2021


Hi, Jason.

On Sun, Mar 21, 2021 at 5:21 AM Jason Long <hack3rcon at yahoo.com> wrote:

> Hello,
> I used "Clusters from Scratch" to configuration two nodes. I got below
> error:
>
> # pcs status
> Cluster name: mycluster
> Cluster Summary:
>   * Stack: corosync
>   * Current DC: node1 (version 2.0.5-10.fc33-ba59be7122) - partition with
> quorum
>   * Last updated: Sun Mar 21 15:35:18 2021
>   * Last change:  Sun Mar 21 15:29:38 2021 by root via cibadmin on node1
>   * 2 nodes configured
>   * 2 resource instances configured
>
> Node List:
>   * Online: [ node1 node2 ]
>
> Full List of Resources:
>   * WebSite    (ocf::heartbeat:apache):     Stopped
>   * ClusterIP    (ocf::heartbeat:IPaddr2):     Started node1
>
> Failed Resource Actions:
>   * WebSite_start_0 on node1 'error' (1): call=6, status='complete',
> exitreason='Failed to access httpd status page.',
> last-rc-change='2021-03-21 15:23:45 +03:30', queued=0ms, exec=1318ms
>   * WebSite_start_0 on node2 'error' (1): call=6, status='complete',
> exitreason='Failed to access httpd status page.',
> last-rc-change='2021-03-21 15:23:47 +03:30', queued=0ms, exec=1380ms
>
> Daemon Status:
>   corosync: active/enabled
>   pacemaker: active/enabled
>   pcsd: active/enabled
>
>
> *********
> I have some questions:
>
> 1- In "Chapter 6. Add Apache HTTP Server as a Cluster Service", an
> important note said:
> "Do not enable the httpd service. Services that are intended to be managed
> via the cluster software should never be managed by the OS. It is often
> useful, however, to manually start the service, verify that it works, then
> stop it again, before adding it to the cluster. This allows you to resolve
> any non-cluster-related problems before continuing. Since this is a simple
> example, we’ll skip that step here."
>
> If the Apache service is not enabled they how can I connect to it via
> below command:
>

> # wget -O - http://localhost/server-status
> --2021-03-21 15:38:39--  http://localhost/server-status
> Resolving localhost (localhost)... 127.0.0.1, ::1
> Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection
> timed out.
> Connecting to localhost (localhost)|::1|:80... failed: Network is
> unreachable.
>

Pacemaker starts the httpd service by starting the ocf:heartbeat:apache
resource. The article is saying that the httpd.service systemd unit should
not be enabled to start automatically at boot; it should only start when
the cluster starts it. That is `systemctl is-enabled httpd.service` should
print "disabled".


>
> 2- Below commands must be run on both nodes or just one node?
>
> # pcs resource create ClusterIP ocf:heartbeat:IPaddr2
> ip="IP_That_Never_Used_In_The_Network" cidr_netmask=32 op monitor
> interval=30s
>
> # pcs resource create WebSite ocf:heartbeat:apache
> configfile=/etc/httpd/conf/httpd.conf statusurl="
> http://localhost/server-status" op monitor interval=20s
>

Just one node.


>
> 3- Why "* WebSite    (ocf::heartbeat:apache):     Stopped" ?
>

The apache resource agent ran a command similar to `wget -O- -q -L
--no-proxy --bind-address=127.0.0.1 <status_url>` and got an error. It
tried this on a start operation on each node, and it failed on both nodes.
When a resource fails to start on a given node, the default response is to
prevent it from starting on that node again until the failure is cleared.


> Logs are:
> https://paste.ubuntu.com/p/MtkfXyRX4P/
>
>
> Thank you.
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>


-- 
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20210321/4eed5722/attachment.htm>


More information about the Users mailing list