[ClusterLabs] Unable to start Apache resource

Reid Wahl nwahl at redhat.com
Mon Sep 25 19:50:33 EDT 2023


On Tue, Sep 19, 2023 at 9:10 AM Bartosz Kaczyński <bkaczynski at posteo.net> wrote:
>
> Greetings,
>
> I am facing an issue with launching a primitive resource in a two-node
> Pacemaker/Corosync cluster. I have set up a lab environment based on the
> guidelines from the "Say Goodbye to Downtime with SUSE Linux Enterprise
> Server (Repeat)" [1] course.
>
> In my lab environment, I am using openSUSE Leap 15.5.
> Steps I have taken so far:
>
> - Created an IP resource
>
> --8<---------------cut here---------------start------------->8---
> crm configure
> primitive p-IP_101 IPaddr2 \
>           params ip=172.17.17.101 cidr_netmask=24 nic=bond1 \
>           op start timeout=20s interval=0 \
>           op stop timeout=20s interval=0 \
>           op monitor  timeout=20s interval=10s \
>           meta target-role=Started
> commit
> --8<---------------cut here---------------end--------------->8---
>
>
> - Created an Apache resource
>
> crm configure edit # and added following content of the bottom of the
> file
>
> --8<---------------cut here---------------start------------->8---
> primitive p-apache2_1 apache \
>           params configfile="/etc/apache2/http_1.conf" \
>           statusurl="172.17.17.101:8180" \
>           op start interval=0 timeout=40 \
>           op stop interval=0 timeout=60 \
>           op monitor interval=10 timeout=20
> --8<---------------cut here---------------end--------------->8---
>
> - Edited the Apache configuration files
>
> cp /etc/apache2/httpd.conf /etc/apache2/httpd_1.conf
> cp /etc/apache2/listen.conf /etc/apache2/listen_1.conf
>
> vi /etc/apache2/httpd_1.conf
>
> --8<---------------cut here---------------start------------->8---
> Include /etc/apache2/listen_1.conf
>
> --snip--
> Pidfile /var/run/httpd_1.pid
> --8<---------------cut here---------------end--------------->8---
>
> vi /etc/apache2/listen_1.conf
>
> --8<---------------cut here---------------start------------->8---
> Listen 172.17.17.101:8180
>
>
> <IfDefine SSL>
>         <IfDefine !NOSSL>
>         <IfModule mod_ssl.c>
>
>                 Listen 172.17.17.101:8443
>
>         </IfModule>
>         </IfDefine>
> </IfDefine>
> --8<---------------cut here---------------end--------------->8---
>
>
> - Ensured file synchronization using csync2
> - Created a resource group with primitives for the IP and Apache resources
>
> --8<---------------cut here---------------start------------->8---
> crm configure
> group g-apache2_1 p-IP_101 p-apache2_1 description="Apache2 Instance 1"
> commit
> --8<---------------cut here---------------end--------------->8---
>
> - Started the resources, resulting in an error (logs provided below)
>
> --8<---------------cut here---------------start------------->8---
> Failed Resource Actions:
>   * p-apache2_1_start_0 on node01 'not installed' (5): call=24, status='complete', exitreason='environment is invalid, resource considered stopped', last-rc-change='Tue Sep 19 17:17:49 2023', queued=0ms, exec=39ms
>   * p-apache2_1_start_0 on node02 'not installed' (5): call=26, status='complete', exitreason='environment is invalid, resource considered stopped', last-rc-change='Tue Sep 19 15:46:48 2023', queued=0ms, exec=40ms
> --8<---------------cut here---------------end--------------->8---
>
> --8<---------------cut here---------------start------------->8---
> crm configure rsctest p-apache2_1
> INFO: Probing resources
> INFO: Testing on node01: p-apache2_1
> ERROR: host node01 (exit code 5)
>
> INFO: Testing on node02: p-apache2_1
> ERROR: host node02 (exit code 5)
> --8<---------------cut here---------------end--------------->8---
>
>
> The Apache server is installed on both nodes
>
> --8<---------------cut here---------------start------------->8---
> node01:~ # zypper se -i apache2
> Loading repository data...
> Reading installed packages...
>
> S  | Name            | Summary                                          | Type
> ---+-----------------+--------------------------------------------------+--------
> i+ | apache2         | The Apache Web Server                            | package
> i  | apache2-prefork | Apache 2 "prefork" MPM (Multi-Processing Module) | package
> i  | apache2-utils   | Apache 2 utilities                               | package
> node01:~ # ssh node02 zypper se -i apache2
> Loading repository data...
> Reading installed packages...
>
> S  | Name            | Summary                                          | Type
> ---+-----------------+--------------------------------------------------+--------
> i+ | apache2         | The Apache Web Server                            | package
> i  | apache2-prefork | Apache 2 "prefork" MPM (Multi-Processing Module) | package
> i  | apache2-utils   | Apache 2 utilities                               | package
> --8<---------------cut here---------------end--------------->8---
>
> and the firewall is disabled. What else can I check?

Are there any more logs (for example, in /var/log/messages) from the
apache resource agent?

The "environment is invalid, resource considered stopped" message
comes from handle_invalid_env() in the ocf-rarun file (installed at
/usr/lib/ocf/lib/heartbeat/ocf-rarun on my machine). It can happen if
one of the required binaries is not installed **or** if the apache
resource agent's validate_all() function fails.

The required binaries list is empty for the apache resource agent, so
I suppose validate_all() is failing. There should be something in the
system logs.

>
> Best regards,
> Bartosz Kaczyński
>
> [1] https://open.sap.com/courses/suse2-1-pc
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



-- 
Regards,

Reid Wahl (He/Him)
Senior Software Engineer, Red Hat
RHEL High Availability - Pacemaker



More information about the Users mailing list