We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Cluster Services will not start

Justin_Edmands
on
Medium Priority
4,405 Views
Last Modified: 2013-12-16
Specifically, we are trying to setup a two-node cluster to provide a highly available apache server. After reviewing the documentation, it appears that shared storage may not be necessary, though we would like to have the document root be on shared storage eventually.


We have followed the steps laid out in the howto:

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Cluster_Administration/ap-httpd-service-CA.html


However when we try to start the service in Luci, the httpd service fails to start. We get the following errors in /var/log/messages:


Jun 29 16:22:36 habox1 clurgmgrd: [10855]: <err> Stopping Service
apache:Apache_Test_Srvr > Failed
Jun 29 16:22:36 habox1 clurgmgrd[10855]: <notice> stop on apache
"Apache_Test_Srvr" returned 1 (generic error)
Jun 29 16:22:36 habox1 clurgmgrd[10855]: <crit> #13: Service
service:Web_Server failed to stop cleanly
Jun 29 16:26:29 habox1 clurgmgrd[10855]: <notice> Starting disabled
service service:Web_Server
Jun 29 16:26:29 habox1 clurgmgrd: [10855]: <err> Looking For IP
Addresses [apache:Apache_Test_Srvr] > Failed - No IP Addresses Found
Jun 29 16:26:29 habox1 clurgmgrd[10855]: <notice> start on apache
"Apache_Test_Srvr" returned 1 (generic error)
Jun 29 16:26:29 habox1 clurgmgrd[10855]: <warning> #68: Failed to start
service:Web_Server; return value: 1
Jun 29 16:26:29 habox1 clurgmgrd[10855]: <notice> Stopping service
service:Web_Server
Jun 29 16:26:35 habox1 clurgmgrd: [10855]: <err> Checking Existence Of
File /var/run/cluster/apache/apache:Apache_Test_Srvr.pid
[apache:Apache_Test_Srvr] > Failed - File Doesn't Exist
Jun 29 16:26:35 habox1 clurgmgrd: [10855]: <err> Stopping Service
apache:Apache_Test_Srvr > Failed
Jun 29 16:26:35 habox1 clurgmgrd[10855]: <notice> stop on apache
"Apache_Test_Srvr" returned 1 (generic error)
Jun 29 16:26:35 habox1 clurgmgrd[10855]: <crit> #12: RG
service:Web_Server failed to stop; intervention required
Jun 29 16:26:35 habox1 clurgmgrd[10855]: <notice> Service
service:Web_Server is failed
Jun 29 16:26:35 habox1 clurgmgrd[10855]: <crit> #13: Service
service:Web_Server failed to stop cleanly


Can you advise us as to what the problem may be? Let us know if you need
more information.

my cluster.conf file created in web GUI (luci)
 
<?xml version="1.0"?>
<cluster alias="app_server" config_version="16" name="app_server">
        <fence_daemon clean_start="0" post_fail_delay="0" 
post_join_delay="3"/>
        <clusternodes>
                <clusternode name="habox2.nimh.nih.gov" nodeid="1" 
votes="1">
                        <fence>
                                <method name="1"/>
                        </fence>
                </clusternode>
                <clusternode name="habox1.nimh.nih.gov" nodeid="2" 
votes="1">
                        <fence>
                                <method name="1"/>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices/>
        <rm>
                <failoverdomains/>
                <resources>
                        <apache config_file="conf/httpd.conf" 
name="Apache_Test_Srvr" server_root="/etc/httpd" shutdown_wait="0"/>
                        <ip address="172.16.52.151" monitor_link="1"/>
                        <script file="/etc/rc.d/init.d/httpd" 
name="script_test"/>
                        <fs device="/dev/hda2" force_fsck="0" 
force_unmount="0" fsid="36806" fstype="ext3" mountpoint="/HA" 
name="httpd_content" self_fence="1"/>
                </resources>
                <service autostart="1" exclusive="0" max_restarts="0" 
name="Web_Server" recovery="restart" restart_expire_time="0">
                        <apache ref="Apache_Test_Srvr">
                                <ip ref="172.16.52.151"/>
                                <script ref="script_test"/>
                                <fs ref="httpd_content"/>
                        </apache>
                </service>
        </rm>
</cluster>

Open in new window

Document1.pdf
Comment
Watch Question

Author

Commented:
need some help!

Commented:
I think it might be easier to use hearbeat with DRBD: www.linux-ha.org and www.drbd.org. They work very nicely together. Basically you set up some information in their config files about each other, which IP address they will share, etc. Then at the end of it all, you have the heartbeat process start up, which then starts up the DRBD shared storage and places symlinks on the system to point to the shared storage. Heartbeat then handles the starting and stopping of Apache. It is pretty easy to do, and both projects are very well documented and there are many how-to articles on the web for doing exactly what you want to do.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
IMHO, it is better to load balance a web server rather than set it up in a fail over cluster.
You could use rsync to synchronize the document root data.

You could setup a cluster resource dealing with a specific IP.
This will deal with making the IP "available all the time"

One error I see is that you are not assigning an IP that will move with the web server.

You have to setup an IP that will move between/among the nodes.

Author

Commented:
already got DRBD to work and all. need to do RedHat Cluster Suite
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.