一、场景再现
3个节点组件成的rabbitmq集群,出现数据丢失的问题,打开webui
Network partition detected
Mnesia reports that this RabbitMQ cluster has experienced a network partition. There is a risk of losing data. Please read RabbitMQ documentation about network partitions and the possible solutions.
The nature of the partition is as follows:

网络测试
import socket; print(socket.create_connection(("172.20.0.31", 16560), timeout=5) is not None)
测试后发现三个节点可以ping通。
查询默认分区策略:
rabbitmqctl environment | grep cluster_partition_handling
查询后发现默认是ignore类型,具体请看下表。
二、解决方法
修改rabbitmq.conf文件,添加下面后,重启服务器
cluster_partition_handling = autoheal

修改后待观察