Closed epcim closed 7 years ago
Do not work as of now. mysql check script works great from console, but with current setup haproxy do not understand/parse response properly.
root@dbs03:/usr/local/bin# vim /etc/haproxy/
root@dbs03:/usr/local/bin# service haproxy restart
May 29 16:33:06 dbs03 haproxy-systemd-wrapper[17172]: haproxy-systemd-wrapper: SIGINT -> 17174
May 29 16:33:06 dbs03 haproxy-systemd-wrapper[17172]: haproxy-systemd-wrapper: exit, haproxy RC=0
root@dbs03:/usr/local/bin# May 29 16:33:06 dbs03 haproxy[17208]: Proxy mysql_cluster started.
May 29 16:33:06 dbs03 haproxy[17208]: Proxy mysql_cluster started.
May 29 16:33:06 dbs03 haproxy-systemd-wrapper[17207]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
May 29 16:33:06 dbs03 haproxy-systemd-wrapper[17207]: [WARNING] 148/163306 (17208) : config : 'stats' statement ignored for proxy 'mysql_cluster' as it requires HTTP mode.
May 29 16:32:09 dbs03 haproxy[17174]: proxy mysql_cluster has no server available!
May 29 16:33:06 dbs03 haproxy[17209]: Server mysql_cluster/dbs01 is DOWN, reason: Layer7 invalid response, info: "1.1 200 OK<0D><0A>Content-Type: text/plain<0D><0A>Connection: close<0D><0A>Content-Length: 40<0D><0
A><0D><0A>Percona XtraDB Cluster Node is synced.<0D><0A>", check duration: 119ms. 1 active and 1 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
May 29 16:33:06 dbs03 haproxy[17209]: Server mysql_cluster/dbs01 is DOWN, reason: Layer7 invalid response, info: "1.1 200 OK<0D><0A>Content-Type: text/plain<0D><0A>Connection: close<0D><0A>Content-Length: 40<0D><0
A><0D><0A>Percona XtraDB Cluster Node is synced.<0D><0A>", check duration: 119ms. 1 active and 1 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
May 29 16:33:07 dbs03 haproxy[17209]: Backup Server mysql_cluster/dbs02 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 1 active and 0 backup servers left. 0 sessions a
ctive, 0 requeued, 0 remaining in queue.
root@dbs03:/usr/local/bin#
root@dbs03:/usr/local/bin# vim /etc/haproxy/
errors/ haproxy.cfg ssl/
root@dbs03:/usr/local/bin# vim /etc/haproxy/haproxy.cfg
root@dbs03:/usr/local/bin#
root@dbs03:/usr/local/bin#
root@dbs03:/usr/local/bin# curl 10.167.4.51:9200May 29 16:33:07 dbs03 haproxy[17209]: Backup Server mysql_cluster/dbs02 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms.
1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
May 29 16:33:24 dbs03 haproxy[17209]: Server mysql_cluster/dbs03 is DOWN, reason: Layer7 timeout, check duration: 10001ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
May 29 16:33:24 dbs03 haproxy[17209]: Server mysql_cluster/dbs03 is DOWN, reason: Layer7 timeout, check duration: 10001ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
May 29 16:33:24 dbs03 haproxy[17209]: proxy mysql_cluster has no server available!
Percona XtraDB Cluster Node is synced.
root@dbs03:/usr/local/bin#
root@dbs03:/usr/local/bin#
root@dbs03:/usr/local/bin# curl 10.167.4.51:9200
Percona XtraDB Cluster Node is synced.
Aggreed with @cznewt to merge if test are passing (few weeks ago)
With merge wait for @epcim, @pupapaik verification.