# Problem with HAproxy and PXC

**URL:** <https://forums.percona.com/t/problem-with-haproxy-and-pxc/3319>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [March 6, 2014, 1:22pm UTC](https://forums.percona.com/t/problem-with-haproxy-and-pxc/3319 "2014-03-06T13:22:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cetanhota](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@cetanhota](https://forums.percona.com/u/cetanhota)\
**Post date:** [March 6, 2014, 1:22pm UTC](https://forums.percona.com/t/problem-with-haproxy-and-pxc/3319/1 "2014-03-06T13:22:38Z")

</div>

Hello all,

I have followed all the documents on setting up HAproxy to work with PXC. I am currently having an issues with the HAproxy seeing that the nodes are on line and in sync. If I run clustercheck from each PXC node I get output like this:

[mysqladm@centos ~]$ clustercheck  
HTTP/1.1 200 OK  
Content-Type: text/plain  
Connection: close  
Content-Length: 40

Percona XtraDB Cluster Node is synced.

But if I run this command from my HAproxy server I am getting an error that the cluster is not in sync.

[wayne@rose-lab4 ~]$ telnet 192.168.1.60 9200  
Trying 192.168.1.60…  
Connected to 192.168.1.60.  
Escape character is ‘^]’.  
HTTP/1.1 503 Service Unavailable  
Content-Type: text/plain  
Connection: close  
Content-Length: 44

Percona XtraDB Cluster Node is not synced.  
Connection closed by foreign host.

This is what I see in the messages file on each of my PXC nodes:

Mar 6 13:49:32 centos xinetd[2659]: START: mysqlchk pid=3842 from=::ffff:192.168.1.63  
Mar 6 13:49:32 centos xinetd[2659]: EXIT: mysqlchk status=1 pid=3842 duration=0(sec)

I am googled around looking for an answer and I have yet to find anything. Here is what the mysqlchk looks like in /etc/xinetd.d:

# default: on

# description: mysqlchk

service mysqlchk  
{

# this is a config for xinetd, place it in /etc/xinetd.d/

disable = no  
flags = REUSE  
socket\_type = stream  
port = 9200  
wait = no  
user = nobody  
server = /usr/bin/clustercheck  
log\_on\_failure += USERID  
only\_from = 192.168.1.63

# recommended to put the IPs that need

# to connect exclusively (security purposes)

per\_source = UNLIMITED

Thanks for any information you can send me way.

Wayne.

---

<div class="post-metadata">

**Author:** ![mandm](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mandm](https://forums.percona.com/u/mandm)\
**Post date:** [March 14, 2014, 8:30am UTC](https://forums.percona.com/t/problem-with-haproxy-and-pxc/3319/2 "2014-03-14T08:30:10Z")

</div>

is your xinet.d process running on the cluster nodes?

---

<div class="post-metadata">

**Author:** ![cetanhota](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@cetanhota](https://forums.percona.com/u/cetanhota)\
**Post date:** [March 19, 2014, 10:24am UTC](https://forums.percona.com/t/problem-with-haproxy-and-pxc/3319/3 "2014-03-19T10:24:25Z")

</div>

Yup and I see it logging these messages to the messages file: [COLOR=#252C2F]Mar 6 13:49:32 centos xinetd[2659]: START: mysqlchk pid=3842 from=::ffff:192.168.1.63  
[COLOR=#252C2F]Mar 6 13:49:32 centos xinetd[2659]: EXIT: mysqlchk status=1 pid=3842 duration=0(sec)
