I used the below commands to create 3 nodes cluster
docker pull percona/percona-xtradb-cluster:5.7
docker tag percona/percona-xtradb-cluster:5.7 pxc
docker network create --subnet=172.18.0.0./24 net1
docker run -d -p 33010:3306 -e MYSQL_ROOT_PASSWORD=root -e CLUSTER_NAME=pxc_cluster --name=pxc_node1 --net=pxc-network pxc
docker run -d -p 33011:3306 -e MYSQL_ROOT_PASSWORD=root -e CLUSTER_NAME=pxc_cluster -e CLUSTER_JOIN=pxc_node1 --name=pxc_node2 --net=pxc-network pxc
docker run -d -p 33012:3306 -e MYSQL_ROOT_PASSWORD=root -e CLUSTER_NAME=pxc_cluster -e CLUSTER_JOIN=pxc_node1 --name=pxc_node3 --net=pxc-network pxc
it success running.
but, when I stop one node container, docker stop pxc_node1
after I docker start pex_node1
it can’t start again success.
the logs below:
2018-08-26T03:37:50.980926Z 0 [Warning] WSREP: last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT3.50266S), skipping check
2018-08-26T03:38:20.494172Z 0 [Note] WSREP: Current view of cluster as seen by this node
view ((empty))
2018-08-26T03:38:20.495190Z 0 [ERROR] WSREP: 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():159
2018-08-26T03:38:20.495304Z 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
2018-08-26T03:38:20.495463Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1514: Failed to open channel ‘cluster1’ at ‘gcomm://pxc_node1’: -110 (Connection timed out)
2018-08-26T03:38:20.495561Z 0 [ERROR] WSREP: gcs connect failed: Connection timed out
2018-08-26T03:38:20.495621Z 0 [ERROR] WSREP: Provider/Node (gcomm://pxc_node1) failed to establish connection with cluster (reason: 7)
2018-08-26T03:38:20.495701Z 0 [ERROR] Aborting
2018-08-26T03:38:20.495795Z 0 [Note] Giving 0 client threads a chance to die gracefully
2018-08-26T03:38:20.495871Z 0 [Note] WSREP: Waiting for active wsrep applier to exit
2018-08-26T03:38:20.495972Z 0 [Note] WSREP: Service disconnected.
2018-08-26T03:38:20.496274Z 0 [Note] WSREP: Waiting to close threads…
2018-08-26T03:38:25.496469Z 0 [Note] WSREP: Some threads may fail to exit.
2018-08-26T03:38:25.496619Z 0 [Note] Binlog end
can anybody help me ? thanks in advance!