2023-02-04T08:48:28.638287Z 0 [Warning] [MY-000000] [Galera] last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT3.89179S), skipping check
2023-02-04T08:48:30.976326Z 0 [Warning] [MY-000000] [Galera] last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT2.56699S), skipping check
2023-02-04T08:48:57.749130Z 0 [Note] [MY-000000] [Galera] PC protocol downgrade 1 -> 0
2023-02-04T08:48:57.749187Z 0 [Note] [MY-000000] [Galera] Current view of cluster as seen by this node
view ((empty))
2023-02-04T08:48:57.763062Z 0 [ERROR] [MY-000000] [Galera] failed to open gcomm backend connection: 110: failed to reach primary view (pc.wait_prim_timeout): 110 (Connection timed out)
at gcomm/src/pc.cpp:connect():161
2023-02-04T08:48:57.763115Z 0 [ERROR] [MY-000000] [Galera] gcs/src/gcs_core.cpp:gcs_core_open():219: Failed to open backend connection: -110 (Connection timed out)
2023-02-04T08:48:58.764502Z 0 [Note] [MY-000000] [Galera] gcomm: terminating thread
2023-02-04T08:48:58.764567Z 0 [Note] [MY-000000] [Galera] gcomm: joining thread
2023-02-04T08:48:58.792209Z 0 [ERROR] [MY-000000] [Galera] gcs/src/gcs.cpp:gcs_open():1811: Failed to open channel 'pxc-cluster1' at 'gcomm://pxc-node1': -110 (Connection timed out)
2023-02-04T08:48:58.792244Z 0 [ERROR] [MY-000000] [Galera] gcs connect failed: Connection timed out
2023-02-04T08:48:58.807971Z 0 [ERROR] [MY-000000] [WSREP] Provider/Node (gcomm://pxc-node1) failed to establish connection with cluster (reason: 7)
2023-02-04T08:48:58.810304Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-02-04T08:48:58.848418Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-22.1) Percona XtraDB Cluster (GPL), Release rel22, Revision aff6a8b, WSREP version 26.4.3.
2023-02-04T08:48:59.124861Z 0 [Note] [MY-000000] [Galera] dtor state: CLOSED
2023-02-04T08:48:59.124922Z 0 [Note] [MY-000000] [Galera] MemPool(TrxHandleSlave): hit ratio: 0, misses: 0, in use: 0, in pool: 0
2023-02-04T08:48:59.127085Z 0 [Note] [MY-000000] [Galera] apply mon: entered 0
2023-02-04T08:48:59.129080Z 0 [Note] [MY-000000] [Galera] apply mon: entered 0
2023-02-04T08:48:59.131800Z 0 [Note] [MY-000000] [Galera] apply mon: entered 0
2023-02-04T08:48:59.131821Z 0 [Note] [MY-000000] [Galera] cert index usage at exit 0
2023-02-04T08:48:59.131827Z 0 [Note] [MY-000000] [Galera] cert trx map usage at exit 0
2023-02-04T08:48:59.131831Z 0 [Note] [MY-000000] [Galera] deps set usage at exit 0
2023-02-04T08:48:59.131839Z 0 [Note] [MY-000000] [Galera] avg deps dist 0
2023-02-04T08:48:59.131844Z 0 [Note] [MY-000000] [Galera] avg cert interval 0
2023-02-04T08:48:59.131848Z 0 [Note] [MY-000000] [Galera] cert index size 0
2023-02-04T08:48:59.134788Z 0 [Note] [MY-000000] [Galera] Service thread queue flushed.
2023-02-04T08:48:59.138455Z 0 [Note] [MY-000000] [Galera] wsdb trx map usage 0 conn query map usage 0
2023-02-04T08:48:59.138481Z 0 [Note] [MY-000000] [Galera] MemPool(LocalTrxHandle): hit ratio: 0, misses: 0, in use: 0, in pool: 0
2023-02-04T08:48:59.141681Z 0 [Note] [MY-000000] [Galera] Shifting CLOSED -> DESTROYED (TO: 0)
2023-02-04T08:48:59.143082Z 0 [Note] [MY-000000] [Galera] Flushing memory map to disk...
[root@bogon cert]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
847a2562757f percona/percona-xtradb-cluster "/entrypoint.sh my..." 50 seconds ago Exited (1) 6 seconds ago pxc-node2
f344d770f1af percona/percona-xtradb-cluster "/entrypoint.sh my..." About a minute ago Up About a minute 3306/tcp, 4567-4568/tcp, 33060/tcp pxc-node1
# 引导集群(创建第一个节点)
docker run -d \
-e MYSQL_ROOT_PASSWORD=ssss@ \
-e CLUSTER_NAME=pxc-cluster1 \
--privileged \
--name=pxc-node1 \
--net=pxc-network \
-v ~/pxc-docker-test/cert:/cert \
-v ~/pxc-docker-test/config:/etc/percona-xtradb-cluster.conf.d \
percona/percona-xtradb-cluster
# 加入第二个节点
docker run -d \
-e MYSQL_ROOT_PASSWORD=ssss@ \
-e CLUSTER_NAME=pxc-cluster1 \
--privileged \
-e CLUSTER_JOIN=pxc-node1 \
--name=pxc-node2 \
--net=pxc-network \
-v ~/pxc-docker-test/cert:/cert \
-v ~/pxc-docker-test/config:/etc/percona-xtradb-cluster.conf.d \
percona/percona-xtradb-cluster
I did it exactly according to the official website tutorial, I don’t know why it still doesn’t work. Tried so many times, I want to cry