I have installed the xtradb cluster. All works great but now I want to add the failover capability using haproxy and clustercheck. I have run modified the clustercheck by adding extra_args=“–host=172.16.3.8” as the nodes is configured to listen on their private ip only.
when running the clustercheck from cli all works fine however when running it from xinetd it throws 503.
Any idea how to pinpoint the error that I am getting?
/usr/bin/clustercheck clustercheck clustercheckpassword!
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: close
Content-Length: 40
curl localhost:9200
Percona XtraDB Cluster Node is not synced or non-PRIM.
cat /etc/xinetd.d/mysqlchk
# default: on
# description: mysqlchk
service mysqlchk
{
disable = no
flags = REUSE
socket_type = stream
port = 9200
wait = no
user = nobody
server = /usr/bin/clustercheck
server_args = clustercheck clustercheckpassword!
log_on_success += USERID
log_on_failure += USERID
only_from = 0.0.0.0/0
per_source = UNLIMITED
log_type = SYSLOG daemon debug
}
mysql -u clustercheck -h 172.16.3.8 -pclustercheckpassword! -e "show status like 'wsrep_local_state_comment'"
mysql: [Warning] Using a password on the command line interface can be insecure.
+---------------------------+--------+
| Variable_name | Value |
+---------------------------+--------+
| wsrep_local_state_comment | Synced |
+---------------------------+--------+
as can be seen the credentials are not issues.