Problems with HAProxy and Percona XtraDB Cluster

1,042 views
Skip to first unread message

"José C. Massón"

unread,
Sep 24, 2014, 4:45:26 PM9/24/14
to percona-d...@googlegroups.com
Hello everybody

I'm testing a 3 node Percona XtraDB Cluster:

node 1: 192.168.10.161
node 2: 192.168.10.162
node 3: 192.168.10.163

and a HAProxy (1.5.4) in a Debian Wheezy at: 192.168.10.195

My HAProxy config file has the following:

http://linkode.org/RXZXwK9MzntufFAeafOd17


I followed the steps in:

http://www.percona.com/doc/percona-xtradb-cluster/5.6/howtos/haproxy.html

and in every node I added

mysqlchk 9200/tcp # mysqlchk

in the file: /etc/services


But from my machine I get the following error:

$ mysql -uroot -p -h haproxy.gcoop.com.ar -e "show databases"
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial
communication packet', system error: 0

Any ideas?
--
Ing. José C. Massón

gcoop - Cooperativa de Software Libre
Velasco 508 Depto A
www.gcoop.coop (+54 11) 4855-4390
Buenos Aires - Argentina

Jaime Crespo

unread,
Sep 25, 2014, 6:37:45 AM9/25/14
to percona-d...@googlegroups.com

Hi,

El 24/09/2014 22:45, José C. Massón <jo...@gcoop.coop> escribió:
>
> Hello everybody
>
> I'm testing a 3 node Percona XtraDB Cluster:
>
> node 1: 192.168.10.161
> node 2: 192.168.10.162
> node 3: 192.168.10.163
>
> and a HAProxy (1.5.4) in a Debian Wheezy at: 192.168.10.195
>
> My HAProxy config file has the following:
>
> http://linkode.org/RXZXwK9MzntufFAeafOd17
>
>
> I followed the steps in:
>
> http://www.percona.com/doc/percona-xtradb-cluster/5.6/howtos/haproxy.html
>
> and in every node I added
>
> mysqlchk        9200/tcp                # mysqlchk
>
> in the file: /etc/services
>
>
> But from my machine I get the following error:
>
> $  mysql -uroot  -p -h haproxy.gcoop.com.ar -e "show databases"
> Enter password:
> ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
>
> Any ideas?

Check your open ports (netstat) and firewall (iptables -L, aws security groups). That is the exact error that a firewall produces when the connection is dropped.
--
Jaime Crespo
<http://dbahire.com>

Marc Castrovinci

unread,
Sep 25, 2014, 11:51:32 PM9/25/14
to percona-d...@googlegroups.com
I've seen that error also when hapoxy has no healthy nodes to use.

Try: curl hostname:9200
Make sure you get a 200 response for at least one node.

Edgar Muñoz

unread,
Oct 16, 2014, 3:21:13 PM10/16/14
to percona-d...@googlegroups.com
Try to do on each dbhost:

telnet localhost 9200 

I has to give you http 200 ok
Reply all
Reply to author
Forward
0 new messages