请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

从节点无法正常运行

图片描述
1.首先,我停掉了所有node1至node5的容器,并且删掉。而且我把v1至v5卷里面的grastate.dat也都删掉。从头开始。
图片描述
2.这里我先是创建了主节点node1,并启动,且用客户端连接了,还查询了一下表。如下图
图片描述
3.如第二部的图;接着第二部的图。而且还看了主节点的grastate.dat文件的safe_to_bootstrap: 1;如下图
图片描述
4.最后确定都没问题后,我才执行的创建从节点node2。
docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=root -e CLUSTER_NAME=PXC -e XTRABACKUP_PASSWORD=root -e CLUSTER_JOIN=node1 -v v2:/var/lib/mysql -v backup:/data --privileged --name=node2 --net=net1 --ip 172.18.0.3 pxc
最后的结果还是如第二部的图一样,过一会,node2节点就回自动挂掉。这问题困扰几天了,搞的都快没动力了。那位大神给点经验;指点一下。拜托拜托

5.我把docker logs node2 中最开始出现报错的日志也发下吧。最开始出现error处我加粗了字体。如下:

2021-04-13T15:21:57.100746Z 0 [Note] [MY-000000] [WSREP] Starting replication
2021-04-13T15:21:57.100840Z 0 [Note] [MY-000000] [Galera] Connecting with bootstrap option: 0
2021-04-13T15:21:57.100922Z 0 [Note] [MY-000000] [Galera] Setting GCS initial position to 00000000-0000-0000-0000-000000000000:-1
2021-04-13T15:21:57.101032Z 0 [Note] [MY-000000] [Galera] protonet asio version 0
2021-04-13T15:21:57.101393Z 0 [Note] [MY-000000] [Galera] Using CRC-32C for message checksums.
2021-04-13T15:21:57.101488Z 0 [Note] [MY-000000] [Galera] initializing ssl context
2021-04-13T15:21:57.101664Z 0 [Note] [MY-000000] [Galera] backend: asio
2021-04-13T15:21:57.101788Z 0 [Note] [MY-000000] [Galera] gcomm thread scheduling priority set to other:0
2021-04-13T15:21:57.101925Z 0 [Warning] [MY-000000] [Galera] Fail to access the file (/var/lib/mysql//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
2021-04-13T15:21:57.101983Z 0 [Note] [MY-000000] [Galera] Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
2021-04-13T15:21:57.102284Z 0 [Note] [MY-000000] [Galera] GMCast version 0
2021-04-13T15:21:57.104894Z 0 [Note] [MY-000000] [Galera] (fc2aadea-82d8, ‘ssl://0.0.0.0:4567’) listening at ssl://0.0.0.0:4567
2021-04-13T15:21:57.105001Z 0 [Note] [MY-000000] [Galera] (fc2aadea-82d8, ‘ssl://0.0.0.0:4567’) multicast: , ttl: 1
2021-04-13T15:21:57.105282Z 0 [Note] [MY-000000] [Galera] EVS version 1
2021-04-13T15:21:57.105426Z 0 [Note] [MY-000000] [Galera] gcomm: connecting to group ‘PXC’, peer 'node1:'
2021-04-13T15:21:57.107770Z 0 [ERROR] [MY-000000] [Galera] handshake with remote endpoint ssl://172.18.0.2:4567 failed: asio.ssl:67567754: ‘invalid padding’ ( 67567754: ‘error:0407008A:rsa routines:RSA_padding_check_PKCS1_type_1:invalid padding’)
This error is often caused by SSL issues. For more information, please see:
https://per.co.na/pxc/encrypt_cluster_traffic

2021-04-13T15:21:58.612446Z 0 [ERROR] [MY-000000] [Galera] handshake with remote endpoint ssl://172.18.0.2:4567 failed: asio.ssl:67567754: ‘invalid padding’ ( 67567754: ‘error:0407008A:rsa routines:RSA_padding_check_PKCS1_type_1:invalid padding’)
This error is often caused by SSL issues. For more information, please see:
https://per.co.na/pxc/encrypt_cluster_traffic

2021-04-13T15:22:00.109921Z 0 [Note] [MY-000000] [Galera] announce period timed out (pc.announce_timeout)
2021-04-13T15:22:00.110215Z 0 [Note] [MY-000000] [Galera] EVS version upgrade 0 -> 1
2021-04-13T15:22:00.110265Z 0 [Note] [MY-000000] [Galera] PC protocol upgrade 0 -> 1
2021-04-13T15:22:00.110335Z 0 [Warning] [MY-000000] [Galera] no nodes coming from prim view, prim not possible
2021-04-13T15:22:00.110377Z 0 [Note] [MY-000000] [Galera] Current view of cluster as seen by this node
view (view_id(NON_PRIM,fc2aadea-82d8,1)
memb {
fc2aadea-82d8,0
}
joined {
}
left {
}
partitioned {
}
)
2021-04-13T15:22:00.113820Z 0 [ERROR] [MY-000000] [Galera] handshake with remote endpoint ssl://172.18.0.2:4567 failed: asio.ssl:67567754: ‘invalid padding’ ( 67567754: ‘error:0407008A:rsa routines:RSA_padding_check_PKCS1_type_1:invalid padding’)
This error is often caused by SSL issues. For more information, please see:
https://per.co.na/pxc/encrypt_cluster_traffic

正在回答

1回答

你用的是5.7.21版本的镜像吗?

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_路途_0 #1
    是的,根据视频的提示用的版本。
    回复 有任何疑惑可以回复我~ 2021-04-14 13:37:10
  • 神思者 回复 提问者 qq_路途_0 #2
    看样子你用的应该不是5.7.21的pxc镜像,你把镜像删除,重新下载5.7.21版本的镜像,注意必须是这个版本的镜像。用浏览器观看视频会弹出这个下载命令,你执行一下
    回复 有任何疑惑可以回复我~ 2021-04-14 16:54:01
  • 提问者 qq_路途_0 回复 神思者 #3
    开始的时候我用的就是视频弹出的命令下载的镜像。我晚上删掉在重新下载试试吧。
    docker pull percona/percona-xtradb-cluster:5.7.21
    回复 有任何疑惑可以回复我~ 2021-04-14 18:11:25
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信