LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-11-2010, 04:05 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question Unable to add "apache" service to Conga - Red Hat Cluster


Dear All,

I am new to clustering. I have created this scenario on VMware Workstation after reading numerous links and videos. Few of them are
http://www.youtube.com/watch?v=ui9QiEPZfGI
http://helpinlinux.blogspot.com/2010...openfiler.html
http://www.howtoforge.com/iscsi_on_linux

Code:
server.a.com    192.168.1.10    CentOS 5.5
server.b.com    192.168.1.20    CentOS 5.5
box.filer.com    192.168.1.30    Openfiler NAS - iscsi disk
Cluster IP     192.168.1.100 through conga web based manager.
I am using a shared GFS2 filesystem mounted on /data for this purpose which is from openfiler.
Code:
[root@server ~]# df -HTP /data
Filesystem    Type     Size   Used  Avail Use% Mounted on
/dev/mapper/vg1-lv0 gfs2    11G   1.1G   9.5G  11% /data
I am trying to create a HTTP cluster so that if in case of one node fails
- Shared partition (/data) in my case gets mounted on the other node
- Also, HTTP services can be started on the other node.


/data has the index.html file which is read by HTTP. Also, I have configured HTTP such that it only listens to 192.168.1.100 (shared IP) on port 80.

Code:
[root@server ~]# grep ^Listen /usr/local/apache/conf/httpd.conf
Listen 192.168.1.100:80
I have configured the cluster, service "sharedIP" which has IP 192.168.1.100; I took help of this doc.

Code:
[root@server ~]# clustat
Cluster Status for rhel-cluster @ Sun Jul 11 12:11:36 2010
Member Status: Quorate

 Member Name                                                     ID   Status
 ------ ----                                                     ---- ------
 server.a.com                                                        1 Online, Local, rgmanager
 server.b.com                                                        2 Online, rgmanager

 Service Name                                                     Owner (Last)                                                     State
 ------- ----                                                     ----- ------                                                     -----
 service:sharedIP                                                 server.a.com                                                     started
I have tested the service sharedIP failover by powering off the machines one by one.
I used the below command for failover
Code:
  fence_ack_manual -n server.b.com


Now, I need to try running apache from shared IP 192.168.1.100 which will fetch file from /data/index.html


I tried no. of times to configure service and resource for apache.
But somehow, it is not happening. My apache bin is /usr/local/apache/bin/apachectl start|stop

I have given such long info to help some other newbie. I will certainly write a HOW-TO for this.

Any ideas, links etc. would be helpful. Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	sharedIP.jpg
Views:	41
Size:	64.2 KB
ID:	4089  
 
Old 07-12-2010, 07:14 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
from the screenshot, it does not appear that you have an httpd service configured, but rather just an ip that would likely need to be a resource that the httpd service uses.

see if this guide offers any help for you Example of Setting Up Apache HTTP Server
 
Old 07-13-2010, 12:23 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Question

Quote:
Originally Posted by rayfordj View Post
from the screenshot, it does not appear that you have an httpd service configured, but rather just an ip that would likely need to be a resource that the httpd service uses.

see if this guide offers any help for you Example of Setting Up Apache HTTP Server
Dear Rayford,

I have configured a HTTP server in both of my machines.
Problem is that I am unable to get that HTTP server integrated to my cluster.
 
Old 07-13-2010, 02:04 AM   #4
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
Quote:
Originally Posted by vikas027 View Post
Dear Rayford,

I have configured a HTTP server in both of my machines.
Problem is that I am unable to get that HTTP server integrated to my cluster.
Right, because you are still running the apache instances on each node distinctly and have yet to bring apache (httpd) under the control of the cluster to manage it as an HA service. The guide/URL previously provided demonstrates how to transition httpd from system management to cluster management. More specifically, from A.3. Installing and Configuring the Apache HTTP Server starting about half-way down the page:


Quote:
Originally Posted by RedHat_Documentation
Then, on one node, invoke the Cluster Configuration Tool to add the service, as follows. This example assumes a failover domain named httpd-domain was created for this service.


1. Add the init script for the Apache HTTP Server service.
  • Select the Resources tab and click Create a Resource. The Resources Configuration properties dialog box is displayed.
  • Select Script form the drop down menu.
  • Enter a Name to be associated with the Apache HTTP Server service.
  • Specify the path to the Apache HTTP Server init script (for example, /etc/rc.d/init.d/httpd) in the File (with path) field.
  • Click OK.

...

3. Add an IP address for the Apache HTTP Server service.
  • Click Create a Resource.
  • Choose IP Address from the drop-down menu.
  • Enter the IP Address to be associated with the Apache HTTP Server service.
  • Make sure that the Monitor Link checkbox is left checked.
  • Click OK.
4. Click the Services property.

5. Create the Apache HTTP Server service.
  • Click Create a Service. Type a Name for the service in the Add a Service dialog.
  • In the Service Management dialog, select a Failover Domain from the drop-down menu or leave it as None.
  • Click the Add a Shared Resource to this service button. From the available list, choose each resource that you created in the previous steps. Repeat this step until all resources have been added.
  • Click OK.

Last edited by rayfordj; 07-13-2010 at 02:08 AM.
 
Old 07-14-2010, 09:34 PM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Unhappy

Thanks Rayford for the info. Sorry for late response. I was busy with other assignments.

I have already tried the same. BUT, I have a doubt that dont we need to specify any argument (like start, stop, restart) after /usr/local/apache/bin/apachectl

And, after trying both of the options
Code:
/usr/local/apache/bin/apachectl start
and
/usr/local/apache/bin/apachectl
When, I am trying to enable this service on any of the servers (server.a.com OR server.b.com), I am getting the below error (also attached hereby).

"Unable to retrieve batch 1299872768 status from server.b.com:1111: clusvcadm start failed to start Apache Service: Starting cluster service "Apache Service" on node "server.a.com"

My service sharedIP (currently on server.a.com) is staring fine with cluster and does migrate also well in case of failover.

BUT, I am unable to start Apache Service. I believe once started well, it would be working fine.
Attached Thumbnails
Click image for larger version

Name:	http-error.jpg
Views:	54
Size:	78.2 KB
ID:	4115  

Last edited by vikas027; 07-14-2010 at 09:38 PM.
 
Old 10-28-2010, 09:14 AM   #6
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Question New query

HI ALL,

I apologize for the delay. Actually, I had given up trying to work this.

Now, I have a different scenario and yes, it is working (almost) for me.

I have created this scenario on VMware Workstation 7.0 on my Windows Laptop just for learning purpose. I have all CentOS 5.5 machines and I am following this pdf.

Code:
box1.test.com	192.168.0.101	Cluster Node
box2.test.com	192.168.0.102	Cluster Node
box3.test.com	192.168.0.103	Luci Node and my NFS Server
192.168.0.104 is my Cluster Shared IP created through Conga
I am creating a Two Node HTTP Cluster whose web pages are stored in a NFS server which is also my Luci Node.

All is well as of now, as I can manage services, resources, e.t.c. well through Conga. Also, my HTTP server installed on both the Cluster node is working fine with the data hosted on the NFS server. Also, the failover is working fine

The only problem I have that I am unable to decide which Fence Device to use and how ? I also could not understand the use of Fencing.

Last edited by vikas027; 10-28-2010 at 09:26 AM.
 
Old 10-29-2010, 02:00 AM   #7
levinhha
LQ Newbie
 
Registered: Oct 2010
Posts: 8

Rep: Reputation: 0
Here is some information about fencing. I thinks it's useful for you. And about what fence devices is used, it depend on what server system you have? Ex: IBM Blade Centre or Dell Drac ...
 
Old 10-31-2010, 12:41 AM   #8
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Question Which Fence Device ?

Quote:
Originally Posted by levinhha View Post
Here is some information about fencing. I thinks it's useful for you. And about what fence devices is used, it depend on what server system you have? Ex: IBM Blade Centre or Dell Drac ...
Hi Levinhha,
Thanks for the link. But I am still confused which fence device should I use as I have created this scenario on VMware Workstation 7.0 on my Windows Laptop.
Any ideas ?
 
Old 10-31-2010, 09:19 PM   #9
levinhha
LQ Newbie
 
Registered: Oct 2010
Posts: 8

Rep: Reputation: 0
Sorry, but I don't have any experience about fencing on Virtual Machine on VMWare Workstation. For more detail, I think that you can ask for support from VMWare.
 
Old 11-04-2010, 09:01 AM   #10
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Unhappy

Hi All / Gurus,

Any idea which fence device to use ?
 
Old 11-09-2010, 01:20 PM   #11
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Which Fence Device ?

Dear All,

Any ideas which Fence Device to use ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat Ent. Linux "AS"/"ES" wardialer Linux - Newbie 7 02-11-2011 06:39 AM
how can i add a printer that is not listed in the "Red Hat Printer Config?" kublador Linux - Newbie 2 03-05-2003 08:37 PM
How to add a system service in "ntsysv" list? yuzuohong Linux - General 1 07-15-2002 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration