I've left your diagram below for reference.
Your MySQL server is on a separate subnet, so here is what happens when
you try to connect to MySQL from (say) RS1:
1. RS1 sends packet to 61.131.4.168
1.1 Since RS1's default source IP will be the VIP by default
(so that LVS-DR works), the source will be the VIP
2. 61.131.4.168 sends reply to VIP
3. MySQL reply hits the director, and is sent to (probably) one of
the other RS's.
To fix this, you need to set up your routing so that the source IP will
be set to the RIP when contacting the MySQL server. You can do this
with the iproute2 tools. Just add a route to the MySQL server on each
of your RS's that sets the source IP to the RIP.
Note that for this to work, the RIP's must be public (at least to the
MySQL server). Yours seem to be, judging by the IP's that you've used.
-----Original Message-----
From: charles huang [mailto:charles-huang@xxxxxxxx]
Sent: Tuesday, September 11, 2001 12:01 PM
To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: lvs_dr and mysql
Hi! lvs system :
________
| |
| client |
|________|
|
(router)(62.132.4.129)
__________
|
| MySQL |
__________
|---------------------------------------------- | Server |
| | | VIP=62.132.4.187 (eth0:0, arps)
| 3.23.41 |
| director |--- DIP=62.132.4.170 (eth0)
----------
|__________| |
61.131.4.168
|
|
-------------------------------------
| | |
| | |
RIP1=62.132.4.171 RIP2=62.132.4.172 RIP3=62.132.4.173 (eth0)
VIP=62.132.4.187 VIP=62.132.4.187 VIP=62.132.4.187 (all dummy0:0,
non-arping)
_____________ _____________ _____________
| | | | | |
| realserver | | realserver | | realserver |
|_____________| |_____________| |_____________|
| | |
(router) (router) (router)
| | |
----------------------------------------------> to router
in front of
director
I find that php on realserver do not connect to the mysql server. But
other machine can connect to mysql server(mysql server no connect
limited)
what's error ?
?!!!
致
礼!
charles huang
charles-huang@xxxxxxxx
_______________________________________________
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
|