1. Navicat连接到MongoDB发生了一个异常出现了Cannot connect to MongoDB.No suitable servers found: 'serverSelectionTimeoutMS’expired2.首先排查服务是否启用
systemctl status mongod.service
3.接着排查服务器端口是否打开
检查服务器端口是否打开
firewall-cmd --zone=public --query-port=27017/tcp
排查是否开启远程连接Mongodb
vi /etc/mongod.conf
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.