HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Howto: Set Up A Loadbalanced High-Availability Apache Cluster (http://www.howtoforge.com/forums/showthread.php?t=12032)

PeterBiggerstaff 12th April 2007 04:12

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?

PeterBiggerstaff 12th April 2007 05:37

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

PeterBiggerstaff 12th April 2007 06:07

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?

johN5Five^ 13th April 2007 01:29

:( 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 ..

falko 13th April 2007 15:21

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 13th April 2007 15:22

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.

johN5Five^ 13th April 2007 16:54

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..:)

falko 13th April 2007 17:13

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!


All times are GMT +2. The time now is 14:45.

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