Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th April 2007, 04:12
PeterBiggerstaff PeterBiggerstaff is offline
Junior Member
 
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Howto: Set Up A Loadbalanced High-Availability Apache Cluster

Hi All,

This question is about: http://www.howtoforge.com/high_avail...apache_cluster


First off, I have to say this is a fantastic howto! I realize that "high availability" and clustering is an very complex process, yet this howto has done an excellent job of compressing it down to a "n00bs guide"

Everything went well (I have 2 load balancers, with active fail over, works perfectly, except the last step..

The howto is for Debian, but the project I am working on is Fedora based.

The howto says to do this on the webservers:

Quote:
vi /etc/network/interfaces
auto lo:0
iface lo:0 inet static
address 192.168.0.105
netmask 255.255.255.255
pre-up sysctl -p > /dev/null
But Redhat/Fedora does not use /etc/network/interfaces it uses
/etc/sysconfig/network-scripts/ifcfg-eth*

I have tried putting this in /etc/sysconfig/network-scripts/ifcfg-lo:0
Quote:
DEVICE=eth0 (I've also tried commenting this out, or using lo:0)
BOOTPROTO=static
BROADCAST=192.168.19.255
HWADDR=00:0C:29:58:10:00 (again I've tried commenting this out)
IPADDR=192.168.19.20 (the virtual IP address)
IPV6ADDR=
IPV6PREFIX=
NETMASK=255.255.255.0
NETWORK=192.168.19.0
ONBOOT=yes
but doing that just breaks all network connectivity...

Does anyone have any ideas?
Reply With Quote
Sponsored Links
  #2  
Old 12th April 2007, 05:37
PeterBiggerstaff PeterBiggerstaff is offline
Junior Member
 
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solution found

found this on the ultra monkey site:

Quote:
The file /etc/sysconfig/network-scripts/ifcfg-lo:0 configures the lo:0 interface, an example follows:

Quote:
DEVICE=lo:0
IPADDR=192.168.6.240
NETMASK=255.255.255.255
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
NAME=loopback
To bring up the IP alias the ifup command is used:

/sbin/ifup lo
Reply With Quote
  #3  
Old 12th April 2007, 06:07
PeterBiggerstaff PeterBiggerstaff is offline
Junior Member
 
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default still does not work though

even with the alias added.. it still won't work.

I can ping the virtual IP address... but its not routing port 80 thru to the webservers!

anyone?
Reply With Quote
  #4  
Old 13th April 2007, 01:29
johN5Five^ johN5Five^ is offline
Junior Member
 
Join Date: Apr 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i also hving a same problem like u...
i make apache webserver and mysql cluster with load balancing..but i also facing the same problem..
i m using Ubuntu 5.10

after i add this to the interfaces ...and i ifup lo:0

vi /etc/network/interfaces

auto lo:0
iface lo:0 inet static
address 10.100.100.105
netmask 255.255.255.0
pre-up sysctl -p > /dev/null

The virtual ip still exist..but mysql cluster connection to mgm node lost...and connection to internet also lost...

b4 i ifup , everything works fine..mysql cluster node all fine..
and i think is something wrong with the interfaces file..

Quote:
vi /etc/network/interfaces
auto lo:0
iface lo:0 inet static
address 192.168.0.105
netmask 255.255.255.255
pre-up sysctl -p > /dev/null
y the netmask is 255.255.255.255 ????
what is the meaning of pre-up sysctl -p > /dev/null ???

plz help us ..
Reply With Quote
  #5  
Old 13th April 2007, 15:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by johN5Five^
i also hving a same problem like u...
i make apache webserver and mysql cluster with load balancing..but i also facing the same problem..
i m using Ubuntu 5.10

after i add this to the interfaces ...and i ifup lo:0

vi /etc/network/interfaces

auto lo:0
iface lo:0 inet static
address 10.100.100.105
netmask 255.255.255.0
pre-up sysctl -p > /dev/null

The virtual ip still exist..but mysql cluster connection to mgm node lost...and connection to internet also lost...

b4 i ifup , everything works fine..mysql cluster node all fine..
and i think is something wrong with the interfaces file..



y the netmask is 255.255.255.255 ????
what is the meaning of pre-up sysctl -p > /dev/null ???

plz help us ..
Can you post your /etc/network/interfaces file? Please wrap it in CODE tags so that I can see if leading spaces are correct in your file.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 13th April 2007, 15:21
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by PeterBiggerstaff
The howto is for Debian, but the project I am working on is Fedora based.
Unfortunately I don't know how the syntax should be in the /etc/sysconfig/network-scripts/ifcfg-lo:0 file...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 13th April 2007, 16:54
johN5Five^ johN5Five^ is offline
Junior Member
 
Join Date: Apr 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is my sql1 and sql2 interface file..which's the ip is 10.100.100.102 (sql1) and 10.100.100.103 (sql2).

All my 4 pc is throught a hub and go to a DNS.

#vi /etc/network/interfaces
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
	script grep
	map eth0

# The primary network interface
iface eth0 inet static
address 10.100.100.102
netmask 255.0.0.0
gateway 10.100.100.1

 auto eth0


 auto lo:0	
 iface lo:0 inet static
 address 10.100.100.105
 netmask 255.0.0.0
 gateway 10.100.100.1
 pre-up sysctl -p > /dev/null
This is my etc/network/interfaces file.

i dont understand is the netmask of the virtual ip, what should it be??and the 'pre-up sysctl -p > /dev/null' ...
is there anything i set wrong ..plz correct me..thx..
Reply With Quote
  #8  
Old 13th April 2007, 17:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

It must be like this:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
	script grep
	map eth0

# The primary network interface
iface eth0 inet static
	address 10.100.100.102
	netmask 255.0.0.0
	gateway 10.100.100.1

 auto eth0


auto lo:0	
iface lo:0 inet static
	address 10.100.100.105
	netmask 255.0.0.0
	gateway 10.100.100.1

pre-up sysctl -p > /dev/null
Take care about the leading spaces!
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 20:38
Set Up A Loadbalanced High-Availability Apache Cluster gg234 HOWTO-Related Questions 23 9th May 2007 19:45
Loadbalanced High-Availability Apache Cluster manurro HOWTO-Related Questions 4 10th April 2007 16:59
Loadbalanced Apache Cluster Help brianwebb01 Installation/Configuration 2 18th October 2006 18:01
newbie ububtu 6.0.6 error PHP binary line 816 davidsky73 Installation/Configuration 8 17th September 2006 12:51


All times are GMT +2. The time now is 07:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.