Re: MySQL Clustering; Load balancing is not working.



On Thu, 19 Feb 2009, Stackpole, Chris wrote:

I wanted to learn more about MySQL clustering so I looked around and
found this guide [1]. It was the newest guide I found (8 months old), so
I decided to give it a shot. I went through the guide with a little
deviation and I end up with mostly the same results as the author. Data
written to one node, shows up real quick on the other node. The
management interface all gives the same results as the author too.
However, the big problem (and reason for my post) is the virtual IP for
the load balancing doesn't work right.

When I try connect to the virtual IP:
$ mysql -h 10.0.1.10 -u ldirector -p
Enter password:
It will sit here for a really long time before giving:
ERROR 2003 (HY000): Can't connect to MySQL server on '10.0.1.10' (111)


For most of this, you don't need to follow the instructions there to a
tee, where ever possible I just use what ever is in apt, most of it
version agnostic. The real important thing, it just the methods.

Step 2) Author uses MySQL 5.1.24 compiled from source. I used apt (I am
not afraid to compile but I didn't because apt is awesome :).
$ apt-cache show mysql-server | grep -i version
Version: 5.0.51a-24

Well, I guess I can see the versioning being a problem. Maybe I should
update and compile a newer version. ??


Step 6.1) For whatever reason, I can't update the GPG key for
ultramonkey, but I just hit y to install anyway on apt. Also, he
installs libdbd-mysql-perl from a download he gives from CPAN. I had
errors with his commands. Turns out you have to install
libmysqlclient15-dev (not 14) and you have to install make too! Then his
link to the DBD-mysql-3.0002.tar.gz didn't work for me. However, the
link to the newest (I believe) DBD-mysql-3.0008.tar.gz, _did_ work. So I
installed that one. So again, versioning issues?


From what I remember, ultramonkey is kind of dead. All you really need to
install is ldirectord for the load balancing and heartbeat for failover,
both of which are in debians repositories. So, I would just uninstall
everything you installed from ultramonkey, remove them from your sources
list and just install heartbeat and ldirector debians rep.

for the DBD-mysql, you can just install libdbd-mysql-perl, that will
provide what you need.

Step 6.2 - 7) Everything works exactly as the author suggests it should,
/except/ for the last line of:
`mysql -h 10.0.1.10 -u ldirector -p`

As stated before, this fails. I can ping 10.0.1.10. I can even ssh into
10.0.1.10. They both redirect me to the (current) primary load balancer.
If I turn off the primary, I go to the secondary. Also, if I run
`ipvsadm -L -n` I can see the connections show up, even though they time
out. So I don't think it is the virtual part. I think it is the
redirection to the MySQL session.

The only thing I have found in the log files that doesn't look right, is
every once in a while this line is put into the /var/log/ldirectord.log:
Exiting with exit_status 2: configu_error: Configuration Error
The thing is, from everything I can find, it is correct. I posted at the
end of the email.

I would appreciate any feedback people may have.

Thanks!
~Stack~

[1]
http://www.howtoforge.com/setting-up-a-loadbalanced-mysql-cluster-with-m
ysql5.1

$cat /etc/ha.d/ldirector.cf
# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual=10.0.1.10:3306
service=mysql
real=10.0.1.33:3306 gate
real=10.0.1.34:3306 gate
checktype=negotiate
login="ldirector"
passwd="ldirectorpassword"
database="ldirectordb"
request="SELECT * FROM connectioncheck"
scheduler=wrr

your config looks ok. The one other thing I would check is the entries in
your /etc/sysctl.conf to turn off arp. That sounds like that may be the
main issue here



--
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Changing over to Linux Completely.
    ... Box that would come with two manuals: Admin Guide and User Guide. ... The guides are available for download ... I have an ATI video card integrated into my Laptop. ... and install libxine from the Packman repos. ...
    (alt.os.linux.suse)
  • Re: make htmldocs -- docbook-utils
    ... > Please write such a guide after you figure out how to do it and submit it ... First I tried to install the sources of docbook-utils from Debian ... It required jade jade required librep (LISP ...
    (Linux-Kernel)
  • [UNIX] Zorum XSS Vulnerability and Path Disclosure
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Get Thawte's New Step-by-Step SSL Guide for MSIIS ... In this guide you will find out how to test, purchase, install ... Using the method variable it is possible to return a malicious HTML and/or ...
    (Securiteam)
  • Re: Help!
    ... >> If you are so lazy as to not want to read through the getting started guide ... The only "easy" OS install I have ever done was with the microsoft answer ... I do wish that debian had such a utility though, it would be the ultimate in ...
    (Debian-User)
  • Re: where is the playing directory defined in the source?
    ... DLB configuration ("data librarian", ... The install instructions for linux said I had ... I disabled it and did the whole compiling process again. ... Oh well now I can move forward in the guide. ...
    (rec.games.roguelike.nethack)