Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th May 2010, 12:55
Zordax Zordax is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Set Up A Load-Balanced MySQL Cluster

Hia all, im working on setting up loadbalanced mysql cluster.

atm it is just to see if it works. I'm using 3 servers.
1 ndb manager with the loadbalancer
2 mysql servers

I have been following this guide:
http://www.howtoforge.com/loadbalanc...cluster_debian

Everything works great except the loadbalancing.. =)

The mysql servers are upp and running, i can connect to them localy or remote to their real ip.
But i can not connect to them trough the Vip.

my /etc/ha.d/ldirectord.cf:

#Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="/var/log/test"
quiescent=yes

virtual = 192.168.0.21:3306
service = mysql
real = 192.168.0.24:3306 gate
real = 192.168.0.25:3306 gate
checktype = negotiate
login = "ldirector"
passwd = "test"
database = "ldirectordb"
request = "SELECT * FROM connectioncheck"
scheduler = wrr


ipvsadm:

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.21:mysql wrr
-> 192.168.0.25:mysql Route 0 0 0
-> 192.168.0.24:mysql Route 0 0 0

All other services are upp and running.

Anyone have a clue why it doesent work?
Reply With Quote
Sponsored Links
  #2  
Old 7th May 2010, 14:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Any errors in your logs?
What are the outputs of
Code:
ifconfig
on the load balancers?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 11th May 2010, 12:40
Zordax Zordax is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Post

Hia again

I can't see any errors in the logs.
atm i only have one load balancer.

ldirector is up and running:
ldirectord ldirectord.cf status
ldirectord for /etc/ha.d/ldirectord.cf is running with pid: 2868

ipvsadm:

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.21:mysql wrr
-> 192.168.0.23:mysql Route 0 0 0
-> 192.168.0.25:mysql Route 0 0 0
-> 192.168.0.24:mysql Route 0 0 0

ifconfig
eth0 Link encap:Ethernet HWaddr 00:1a:a0:b9:0a:ed
inet addr:192.168.0.3 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::21a:a0ff:feb9:aed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9735 errors:0 dropped:0 overruns:0 frame:0
TX packets:18782 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1562366 (1.4 MiB) TX bytes:2472830 (2.3 MiB)
Interrupt:16

eth0:1 Link encap:Ethernet HWaddr 00:1a:a0:b9:0a:ed
inet addr:192.168.0.21 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:425 errors:0 dropped:0 overruns:0 frame:0
TX packets:425 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:35182 (34.3 KiB) TX bytes:35182 (34.3 KiB)




One thing is strange.
I can not ping the mysql servers from the load server
I can ping the load server from the mysql servers..
Reply With Quote
  #4  
Old 11th May 2010, 12:52
Zordax Zordax is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

BAH! found an error in /etc/ha.d/haresources

I had the wrong broadcast in:
IPaddr2::192.168.0.21/16/eth0/192.168."255".255

atlast it's alive! =)
Reply With Quote
The Following User Says Thank You to Zordax For This Useful Post:
falko (12th May 2010)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
yum issues el-sid Installation/Configuration 4 10th August 2011 12:01
Mysql Cluster over VPN bacterie HOWTO-Related Questions 0 14th April 2010 23:34
How To Set Up A Load-Balanced MySQL Cluster : VMWare Image available ? ubidata HOWTO-Related Questions 3 1st November 2007 19:55
mysql clustering problem : cannot create table in database prince.fer Server Operation 2 16th April 2007 18:03
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29


All times are GMT +2. The time now is 10:36.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.