[ClusterLabs] Apache doesn't start under corosync with systemd

Ken Gaillot kgaillot at redhat.com
Mon Oct 14 15:01:51 EDT 2019


On Fri, 2019-10-11 at 17:15 +0000, Reynolds, John F - San Mateo, CA -
Contractor wrote:
> >  If pacemaker is managing a resource, the service should not be
> > enabled to start on boot (regardless of init or systemd). Pacemaker
> > will start and stop the service as needed according to the cluster
> > configuration.
> 
> Apache startup is disabled in systemctl, and there is no apache
> script in /etc/init.d
> 
> > Additionally, your pacemaker configuration is using the apache OCF
> > script, so the cluster won't use /etc/init.d/apache2 at all (it
> > invokes the httpd binary directly).
> > 
> > Keep in mind that the httpd monitor action requires the status
> > module to be enabled -- I assume that's already in place.
> 
> Yes, that is enabled, according to apache2ctl -M.
> 
> 
> The resource configuration is
> 
> Primitive  ncoa_apache apache \
> 	Params configfile="/etc/apache2/httpd.conf"\
> 	Op monitor internval=40s timeout=60s\
> 	Meta target-role=Started
> 
> When I start the resource, crm status shows it in 'starting' mode,
> but never gets to 'Started'.
> 
> There is one process running "/bin/sh
> /usr/lib/ocf/resources.d/heartbeat/apache start"  but the httpd
> processes never come up.  What's worse, with that process running,
> the cluster resource can't migrate; I have to kill it before the
> cluster will finish cleanup and start  on the new node.  'crm
> resource cleanup ncoa_apache' hangs, as well.
> 
> Apache starts up just fine from the systemctl command, so it's not
> the Apache config that's broken.
> 
> Suggestions?
> 
> John Reynolds SMUnix

If you have SELinux enabled, check for denials. The cluster processes
have a different SELinux context than systemd, so policies might not be
set up correctly.
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list