From poken77 at hotmail.com Mon Jul 4 16:29:29 2005 From: poken77 at hotmail.com (kenneth graham) Date: Mon, 04 Jul 2005 10:29:29 -0600 Subject: lvs.cf & mysql In-Reply-To: Message-ID: Hi everyone... I have been looking for a way to monitor a mysql server, I tried to modify the section for the real server to monitor the port 3306, but when i start the pulse daemon, it says that there is and error on that line virtual HTTP1 { active = 1 address = 192.168.4.21 eth0:1 load_monitor = uptime vip_nmask = 255.255.255.0 port = 80 persistent = 20 send = "GET / HTTP/1.0\r\n\r\n" expect = "HTTP" load_monitor = none scheduler = rr protocol = tcp timeout = 5 reentry = 5 server http { address = 192.168.5.40 active = 1 weight = 1 } server mysql { address = 192.168.5.59 > port = 3306 ***** here ***** active = 1 weight = 1 } } I have spent almost 4 days trying to modify the nanny daemon to check the port 3306 but it seems very difficult to me :( has anyone done something like that? thanks a lot for your help Kenneth _________________________________________________________________ Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! http://desktop.msn.de/ Jetzt gratis downloaden! From sebastien.bonnet at experian.fr Tue Jul 5 07:59:37 2005 From: sebastien.bonnet at experian.fr (=?ISO-8859-1?Q?S=E9bastien_BONNET?=) Date: Tue, 05 Jul 2005 09:59:37 +0200 Subject: lvs.cf & mysql In-Reply-To: References: Message-ID: <42CA3DE9.1090906@experian.fr> > I have been looking for a way to monitor a mysql server, I tried to > modify the section for the real server to monitor the port 3306, but > when i start the pulse daemon, it says that there is and error on that line You CAN'T specify the port per real server. It is a virtual server parameter. And you've mixed http and mysql ... You should write a small shell script that tries ti connect to a mysql server given an IP address. If it succeed, print OK, else print FAIL. Then use send_program = instead of then send parameter below (see updated conf, supposing you have two real servers named mysql1 and mysql2). > virtual HTTP1 { virtual DB1 { > active = 1 > address = 192.168.4.21 eth0:1 > load_monitor = uptime > vip_nmask = 255.255.255.0 > port = 80 port = 3306 > persistent = 20 Such a small persistence timeout is useless. Increase or remove ! > send = "GET / HTTP/1.0\r\n\r\n" send_program = "/etc/sysconfig/ha/check_mysql.sh" > expect = "HTTP" expect = "OK" > load_monitor = none > scheduler = rr > protocol = tcp > timeout = 5 > reentry = 5 > server http { server mysql1 { > address = 192.168.5.40 > active = 1 > weight = 1 > } > > server mysql { server mysql2 { > address = 192.168.5.59 >> port = 3306 ***** here ***** remove this ! > active = 1 > weight = 1 > } > } > I have spent almost 4 days trying to modify the nanny daemon to check > the port 3306 but it seems very difficult to me :( Nanny does NOT need any modification to support mysql. > has anyone done something like that? I haven't used piranha to load balance mysql servers but some people already have. Dig a bit in the list archives and you'll find some interesting litterature ! -- S?bastien BONNET -- Ing?nieur syst?me Tel: 04.42.25.15.40 GSM: 06.64.44.58.98 From poken77 at hotmail.com Fri Jul 22 18:53:01 2005 From: poken77 at hotmail.com (kenneth graham) Date: Fri, 22 Jul 2005 18:53:01 +0000 Subject: Persistence through a firewall In-Reply-To: <42CA3DE9.1090906@experian.fr> Message-ID: Hi guys, I have a serious problem with my LVS... here is my configuration: 1 firewall with ip:192.168.4.1 1 loadbalancer with RIP: 192.168.4.20 and VIP:192.168.4.21 3 real servesr with address 192.168.5.1 192.168.5.2 192.168.5.3 (the three real server support PERSISTENCE for the http request) my problem is that I want to do persistence, but after the client connect through the firewall, the load balancer sees always the same source IP address : 192.168.4.1 (IP from the firewall) so teh load balancer send all of the connections the same real server >ipvsadm -l -c pro expire state source virtual destination TCP 14:54 ESTABLISHED 192.168.4.1:1847 192.168.4.21:http 192.168.5.59:http TCP 14:54 ESTABLISHED 192.168.4.1:2203 192.168.4.21:http 192.168.5.59:http TCP 14:54 ESTABLISHED 192.168.4.1:1890 192.168.4.21:http 192.168.5.59:http TCP 14:54 ESTABLISHED 192.168.4.1:3302 192.168.4.21:http 192.168.5.59:http is there something in the ipvs that i need to change? p.s. the problem is not the firewall because another computer behind the firewall is able to see the real IP from the client. the iptables on the loadbalancer is desactivated. thanks in advance for your help and time.