percona / percona-xtradb-cluster-operator

Percona Operator for MySQL based on Percona XtraDB Cluster
https://www.percona.com/doc/kubernetes-operator-for-pxc/index.html
Apache License 2.0
542 stars 188 forks source link

Haproxy fails to start 1.15.0 #1825

Open 71g3pf4c3 opened 1 month ago

71g3pf4c3 commented 1 month ago

Report

Haproxy fails to start with default installation manifests in kind cluster https://github.com/percona/percona-xtradb-cluster-operator/blob/v1.15.0/deploy/cr-minimal.yaml https://github.com/percona/percona-xtradb-cluster-operator/blob/v1.15.0/deploy/cr.yaml In logs server_name is NOSRV, probably issues with haproxy. pxc-monit

More about the problem

Haproxy log snippet:

2024-09-23T13:17:50.216928556Z backend galera-mysqlx-nodes has no server available!
2024-09-23T13:17:55.227011398Z {"time":"23/Sep/2024:13:17:55.226", "client_ip": "127.0.0.1", "client_port":"37676", "backend_source_ip": "-", "backend_source_port": "-", "frontend_name": "galera-admin-i
n", "backend_name": "galera-admin-nodes", "server_name":"<NOSRV>", "tw": "-1", "tc": "-1", "Tt": "0", "bytes_read": "0", "termination_state": "SC", "actconn": "1", "feconn" :"1", "beconn": "0", "srv_con
n": "0", "retries": "0", "srv_queue": "0", "backend_queue": "0" }
2024-09-23T13:18:00.208381308Z {"time":"23/Sep/2024:13:18:00.208", "client_ip": "127.0.0.1", "client_port":"42292", "backend_source_ip": "-", "backend_source_port": "-", "frontend_name": "galera-admin-i
n", "backend_name": "galera-admin-nodes", "server_name":"<NOSRV>", "tw": "-1", "tc": "-1", "Tt": "0", "bytes_read": "0", "termination_state": "SC", "actconn": "1", "feconn" :"1", "beconn": "0", "srv_con
n": "0", "retries": "0", "srv_queue": "0", "backend_queue": "0" }
2024-09-23T13:18:02.725607593Z [WARNING]  (16) : kill 41
2024-09-23T13:18:05.208230901Z {"time":"23/Sep/2024:13:18:05.208", "client_ip": "127.0.0.1", "client_port":"42308", "backend_source_ip": "-", "backend_source_port": "-", "frontend_name": "galera-admin-i
n", "backend_name": "galera-admin-nodes", "server_name":"<NOSRV>", "tw": "-1", "tc": "-1", "Tt": "0", "bytes_read": "0", "termination_state": "SC", "actconn": "1", "feconn" :"1", "beconn": "0", "srv_con
n": "0", "retries": "0", "srv_queue": "0", "backend_queue": "0" }

pxc-monit logs snippet:

2024-09-23T11:43:01.436935675Z now [cluster1-pxc-0.cluster1-pxc.default.svc.cluster.local]
2024-09-23T11:43:01.436937850Z 2024/09/23 11:43:01 execing: /opt/percona/haproxy_add_pxc_nodes.sh with stdin: cluster1-pxc-0.cluster1-pxc.default.svc.cluster.local
2024-09-23T11:43:01.561615843Z 2024/09/23 11:43:01 {"time":"23/Sep/2024:11:43:01.441", "message": "Running /opt/percona/haproxy_add_pxc_nodes.sh"}
2024-09-23T11:43:01.561627802Z {"time":"23/Sep/2024:11:43:01.448", "message": "number of available nodes are 1"}
2024-09-23T11:43:01.561631193Z Configuration file is valid
2024-09-23T11:43:01.561634070Z {"time":"23/Sep/2024:11:43:01.529", "backend_source_ip": "cluster1-pxc-0.cluster1-pxc.default.svc.cluster.local", "backend_source_port": "33062", "message": "The following
 values are used for PXC node cluster1-pxc-0.cluster1-pxc.default.svc.cluster.local in backend : wsrep_local_state is 4; pxc_maint_mod is DISABLED; wsrep_cluster_status is Primary; wsrep_reject_queries
is NONE; wsrep_sst_donor_rejects_queries is OFF; 1 nodes are available"}
2024-09-23T11:43:01.561637929Z {"time":"23/Sep/2024:11:43:01.531", "backend_source_ip": "cluster1-pxc-0.cluster1-pxc.default.svc.cluster.local", "backend_source_port": "33062", "message": "PXC node clus
ter1-pxc-0.cluster1-pxc.default.svc.cluster.local for backend  is ok"}
2024-09-23T11:43:01.561640841Z {"time":"23/Sep/2024:11:43:01.532", "message": "reload | socat stdio /etc/haproxy/pxc/haproxy-main.sock"}
2024-09-23T11:43:01.561642910Z Success=1
2024-09-23T11:43:01.561644963Z --
2024-09-23T11:43:01.561647167Z [NOTICE]   (1) : New worker (173) forked
2024-09-23T11:43:01.561649694Z [NOTICE]   (1) : Loading success.
2024-09-23T11:43:01.561652219Z [NOTICE]   (1) : haproxy version is 2.8.5
2024-09-23T11:43:01.561654945Z [NOTICE]   (1) : path to executable is /usr/sbin/haproxy
2024-09-23T11:43:01.561657001Z [WARNING]  (1) : Former worker (149) exited with code 0 (Exit)

Steps to reproduce

  1. Install kind
  2. Install pxc-operator
  3. Apply https://github.com/percona/percona-xtradb-cluster-operator/blob/v1.15.0/deploy/cr-minimal.yaml or https://github.com/percona/percona-xtradb-cluster-operator/blob/v1.15.0/deploy/cr.yaml manifests

Versions

  1. Kubernetes 1,29,2 (kind)
  2. Operator 1.15.0
  3. Database percona/percona-xtradb-cluster:8.0.36-28.1

Anything else?

No response

hors commented 1 month ago

hi @71g3pf4c3, we do not support kind officially. The SC error flag means that the network or the server refused the connection. I can't reproduce this issue using supported platforms. So, try to check network configuration.