>
> Hello,
>
>
> I use Keepalived for a web cluster and mysql cluster.
> I have a problem when a server in the cluster web want to connect to the
> Virtual IP of cluster mysql.
>
> My configuration :
>
> Load balancer IPs:
> IP of load balancer's external interface MASTER (eth0): 10.80.30.199
> IP of load balancer's external interface BACKUP (eth0): 10.80.30.198
> external VIP of cluster apache: 10.80.30.200
> external VIP of cluster mysql: 10.80.30.201
> IP of load balancer's interface(eth1): 10.252.38.2
> IP of load balancer's interface(eth1): 10.252.38.3
> internal VIP our realserver will use as a default gateway: 10.252.38.1
> Realserver:
> IP: 10.252.38.10 #web1
> IP: 10.252.38.11 #web2
>
> IP: 10.252.38.20 #mysql1
> IP: 10.252.38.21 #mysql2
>
> When i'm connect ssh on a web server (ex 10.252.38.10) i couldn't connect to
> IP cluster of mysql (10.80.30.201).
> Ping is OK but telnet 10.80.30.201 3306 no response !
>
> If i'm connect to a server of cluster mysql directly (ex 10.252.38.20),
> telnet is OK but i want to connect to the cluster for high availability !
>
> Here it's my keepalived.conf of the load balancer MASTER :
>
> vrrp_sync_group VG1 {
> group {
> VI_1
> VI_GATEWAY
> }
> }
>
> vrrp_instance VI_1 {
> state MASTER
> interface eth0
> virtual_router_id 1
> priority 100
> advert_int 1
> lvs_sync_daemon_interface eth0
> virtual_ipaddress {
> 10.80.30.200 # HTTP Portail
> 10.80.30.201 # MYSQL Portail
> }
> }
>
> vrrp_instance VI_GATEWAY {
> state MASTER
> interface eth1
> virtual_router_id 2
> priority 100
> advert_int 1
> lvs_sync_daemon_interface eth1
> virtual_ipaddress {
> 10.252.38.1 # Passerelle pour les serveurs
> }
> }
>
>
> #-----------------------------------------------
> # Definition Cluster HTTP Portail
> #-----------------------------------------------
>
> virtual_server 10.80.30.200 80 {
> delay_loop 6
> lb_algo wrr
> lb_kind NAT
> persistence_timeout 86400
> protocol TCP
>
> real_server 10.252.38.10 80 {
> weight 1
> restart_service
>
> TCP_CHECK {
> connect_port 80
> connect_timeout 3
> }
> }
> real_server 10.252.38.11 80 {
> weight 1
> restart_service
> TCP_CHECK {
> connect_port 80
> connect_timeout 3
> }
> }
>
> virtual_server 10.80.30.201 3306 {
> delay_loop 6
> lb_algo wrr
> lb_kind NAT
> persistence_timeout 86400
> protocol TCP
>
> real_server 10.252.38.20 3306 {
> weight 1
> restart_service
> TCP_CHECK {
> connect_port 3306
> connect_timeout 3
> }
> }
>
> real_server 10.252.38.21 3306 {
> weight 1
> restart_service
> TCP_CHECK {
> connect_port 3306
> connect_timeout 3
> }
> }
> }
>
> Here it's my keepalived.conf of the load balancer MASTER :
>
> vrrp_sync_group VG1 {
> group {
> VI_1
> VI_GATEWAY
> }
> }
>
> vrrp_instance VI_1 {
> state BACKUP
> interface eth0
> virtual_router_id 1
> priority 50
> advert_int 1
> lvs_sync_daemon_interface eth0
> virtual_ipaddress {
> 10.80.30.200 # HTTP Portail
> 10.80.30.201 # MYSQL Portail
> }
> }
>
> vrrp_instance VI_GATEWAY {
> state BACKUP
> interface eth1
> virtual_router_id 2
> priority 50
> advert_int 1
> lvs_sync_daemon_interface eth1
> virtual_ipaddress {
> 10.252.38.1 # Passerelle pour les serveurs
> }
> }
>
>
> #-----------------------------------------------
> # Definition Cluster HTTP Portail
> #-----------------------------------------------
>
> virtual_server 10.80.30.200 80 {
> delay_loop 6
> lb_algo wrr
> lb_kind NAT
> persistence_timeout 86400
> protocol TCP
>
> real_server 10.252.38.10 80 {
> weight 1
> restart_service
>
> TCP_CHECK {
> connect_port 80
> connect_timeout 3
> }
> }
> real_server 10.252.38.11 80 {
> weight 1
> restart_service
>
> TCP_CHECK {
> connect_port 80
> connect_timeout 3
> }
> }
>
> virtual_server 10.80.30.201 3306 {
> delay_loop 6
> lb_algo wrr
> lb_kind NAT
> persistence_timeout 86400
> protocol TCP
>
> real_server 10.252.38.20 3306 {
> weight 1
> restart_service
> TCP_CHECK {
> connect_port 3306
> connect_timeout 3
> }
> }
>
> real_server 10.252.38.21 3306 {
> weight 1
> restart_service
> TCP_CHECK {
> connect_port 3306
> connect_timeout 3
> }
> }
> }
>
> Could you help me please ? Maybe rules iptables ?
>
> Thanks in advance.
>
> Regards,
>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
|