HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Mysql clustering (http://www.howtoforge.com/forums/showthread.php?t=26541)

hello1 3rd September 2008 14:55

Mysql clustering
 
Hi All

I am trying to setup a mysql cluster with 2 data nodes and two load balancers. I have followed the same instrauctions given http://www.howtoforge.com/setting-up...th-mysql5.1-p3 .

Issues

1. On both load balancers

/usr/sbin/ldirectord ldirectord.cf status
ldirectord stale pid file /var/run/ldirectord.ldirectord.cf.pid for /etc/ha.d/ldirectord.cf
ldirectord is stopped for /etc/ha.d/ldirectord.cf

AND

ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.10.10.15:3306 wrr
-> 10.10.10.3:3306 Route 0 0 0
-> 10.10.10.2:3306 Route 0 0 0

Also, getting the following error while starting heartbeat

ldirectord stale pid file /var/run/ldirectord.ldirectord.cf.pid for /etc/ha.d/ldirectord.cf
[ OK ]

What may be the reason? BTW i have verified that failover is happening
when i stop heartbeat on active node.



~Vincent

zer0 3rd October 2008 18:17

i'm having exactly the same problem i', desperated, yesterday it worked just fine, pliz help!

falko 4th October 2008 13:41

You might want to try MySQL master-master replication instead of a MySQL cluster. Replication is easier to manage, and with MySQL version 5, a cluster holds all data in memory only!

maykel535 16th November 2011 15:35

I have th same problem
 
I have installed two loadbalanced and two webserver and it running OK very good. But i have installed two loadbalanced with two mysql server master/master with follow configuration in ldirectord.conf and in two nodes:


# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual=10.100.100.150:3306
real=10.100.100.151:3306 gate
real=10.100.100.152:3306 gate
fallback=127.0.0.1:3306 gate
service=mysql
checktype=negotiate
login="root"
passwd="comnet"
database="mysql"
request="SELECT * FROM user"
scheduler=wrr
protocol=tcp

I follow the tutorial as two webserver and I work fine but with two mysql server not found...No packet forwarding...

And the log /var/log/messages:

ResourceManager[3328]: 2011/11/16_14:25:54 info: Running /etc/ha.d/resource.d/ldirectord ldirectord.cf start
ResourceManager[3328]: 2011/11/16_14:25:55 info: Running /etc/ha.d/resource.d/LVSSyncDaemonSwap master start
LVSSyncDaemonSwap[3429]: 2011/11/16_14:25:55 info: ipvs_syncbackup down
LVSSyncDaemonSwap[3429]: 2011/11/16_14:25:55 info: ipvs_syncmaster up
LVSSyncDaemonSwap[3429]: 2011/11/16_14:25:55 info: ipvs_syncmaster obtained
IPaddr2[3476]: 2011/11/16_14:25:55 INFO: Resource is stopped
ResourceManager[3328]: 2011/11/16_14:25:55 info: Running /etc/ha.d/resource.d/IPaddr2 10.100.100.150/24/eth0/10.100.100.255 start
IPaddr2[3577]: 2011/11/16_14:25:55 INFO: ip -f inet addr add 10.100.100.150/24 brd 10.100.100.255 dev eth0
IPaddr2[3577]: 2011/11/16_14:25:55 INFO: ip link set eth0 up
IPaddr2[3577]: 2011/11/16_14:25:56 INFO: /usr/lib/heartbeat/send_arp -i 200 -r 5 -p /var/run/heartbeat/rsctmp/send_arp/send_arp-10.100.100.150 eth0 10.100.100.150 auto not_used not_used
IPaddr2[3553]: 2011/11/16_14:25:56 INFO: Success



I execute:

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.100.100.150:3306 wrr
-> 10.100.100.151:3306 Route 0 0 0
-> 10.100.100.152:3306 Route 0 0 0
-> 127.0.0.1:3306 Local 1 0 0

But I think failed the ldirectord, because not running with mysql:

root@loadb1:/etc/ha.d# /etc/init.d/ldirectord status
* Running ldirectord status ldirectord stale pid file /var/run/ldirectord.ldirectord.cf.pid for /etc/ha.d/ldirectord.cf
ldirectord is stopped for /etc/ha.d/ldirectord.cf

Can I help me Falko, thanks in advanced.

maykel535 16th November 2011 16:25

I resolved the problem
 
Hi!! I resolve the problem. Thanks falko and all.

Seif 23rd May 2012 13:50

Hi,

I have the same problem, plz tell how did you fix it.

Thx.

maykel535 23rd May 2012 14:52

Ok
 
You need install the follow:

apt-get install libdbi-perl

Now, perl connect to mysql.

Good luck.


All times are GMT +2. The time now is 07:17.

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