LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: 2 box LVS with HA

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: 2 box LVS with HA
From: Nenad Steric <nenad.steric@xxxxxxxxx>
Date: Sun, 28 Jul 2002 23:35:55 +0200
Hallo Alexandre,
Hallo Group,

i changed the group definition as you suggested,
and it still tries to connect to both machines which i have configured as 
realservers,
one is the director A and the other is the failover-director B.
When the request of the client goes to A it works,
when it goes to B it gets no reply.
I have attached my actual keepalived.conf.

After reading again in the LVS-Howto that the realservers have to have their 
gateway on the director
i have also tried to add on B a default route to A
e.g.
"route add default gw 192.168.1.10 netmask 255.255.255.0"
but the connection still hangs.

Is it even possible to accomplish what i am trying to do ?
in the LVS-Howto there is a mail that somebody did this,
but it only says to look at ultramonkey.org for a example,
where i didn't find it.

Best Regards,

Nenad


Alexandre Cassen wrote:
Hi,

yes it tries to connect to B also ! (maybe my persistence_timeout was to high?)


It trieq and it connects only after IP takeover. use iproute2 : ip address list to see IP address set. The VRRP VIPs appear here. See the /var/log/messages, then you will see VRRP state transition (BACKUP to MASTER, ...)

but then it just hangs.
No reply gets sent back to the client.

  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  lvs:http rr
  -> linux10.local:http           Local   1      1          2
  -> 192.168.1.5:http             Masq    1      0          1
As you see 192.168.1.5 (=B) gets the request and then nothing happens.

Any Ideas ?



oh... yes :) reading again your previous mail :

vrrp_sync_group test1 {
        VI_1
        VI_2
}

this declaration is not good. You must use the following syntax :

vrrp_sync_group test1 {
  group {
        VI_1
        VI_2
  }
}

Best regs,
Alexandre


_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users



! Configuration File for keepalived

global_defs {
   notification_email {
     root
   }
   notification_email_from Alexandre.Cassen@xxxxxxxxxxxx
   smtp_server 192.168.1.10
   smtp_connect_timeout 30
   lvs_id linux10
}

vrrp_sync_group test1 {
        group {
                VI_1
                VI_2
        }
}

vrrp_instance VI_1 {
    state MASTER
    interface eth1
    virtual_router_id 51
    priority 100
    authentication {
        auth_type PASS
        auth_pass nenad
    }   
    virtual_ipaddress {
        192.168.1.110/24
    }


vrrp_instance VI_2 {
    state MASTER
    interface eth1
    virtual_router_id 52
    priority 100
    authentication {
        auth_type PASS
        auth_pass nenad
    }
    virtual_ipaddress {
        192.168.1.120/24
    }
}

virtual_server 192.168.1.110 80 {
    #delay_loop 6
    lb_algo rr 
    lb_kind NAT
   # persistence_timeout 5
    protocol TCP
    #virtualhost www.my.com          # The VirtualHost string to use
                                    # in the GET query.

    sorry_server 192.168.1.100 80

    real_server 192.168.1.6 80 {
        weight 1
        TCP_CHECK {
                connect_timeout 20
                
        }
    }
    real_server 192.168.1.11 80 {
        weight  1
        HTTP_GET  {
                url {
                        path /index.html
                        digest a524cfc95b37f75c2278a713d6f94ecc
                }
                connect_timeout 3
        }
        connection_timeout 10
    }    
}
virtual_server 192.168.1.120 23 {
    delay_loop 6
    lb_algo rr 
    lb_kind NAT
    #persistence_timeout 1
    protocol TCP
    #virtualhost www.my.com          # The VirtualHost string to use
                                    # in the GET query.

    sorry_server 192.168.1.100 23

    real_server 192.168.1.6 23 {
        weight 1
        TCP_CHECK {
                connect_timeout 20
                
        }
    }
   real_server 192.168.1.11 23 {
        weight  1
        TCP_CHECK {
                connect_timeout 20
        }
   }    
}










<Prev in Thread] Current Thread [Next in Thread>