Howto: Set Up A Loadbalanced High-Availability Apache Cluster

Discussion in 'HOWTO-Related Questions' started by PeterBiggerstaff, Apr 12, 2007.

  1. PeterBiggerstaff

    PeterBiggerstaff New Member

    Hi All,

    This question is about: http://www.howtoforge.com/high_availability_loadbalanced_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:

    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
    but doing that just breaks all network connectivity...

    Does anyone have any ideas?
     
  2. PeterBiggerstaff

    PeterBiggerstaff New Member

    Solution found

    found this on the ultra monkey site:

     
  3. PeterBiggerstaff

    PeterBiggerstaff New Member

    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?
     
  4. johN5Five^

    johN5Five^ New Member

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

    falko Super Moderator

    Unfortunately I don't know how the syntax should be in the /etc/sysconfig/network-scripts/ifcfg-lo:0 file... :(
     
  6. falko

    falko Super Moderator

    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.
     
  7. johN5Five^

    johN5Five^ New Member

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

    falko Super Moderator

    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!
     

Share This Page