错误现象 :
Cluster description not yet available. Waiting for 30000 ms before timing out
Exception in monitor thread while connecting to server 192.168.13.137:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=192.168.13.137:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=192.168.13.137:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]
解决方案 :
查看防火墙状态
sudo firewall-cmd --state
停止firewall
sudo systemctl stop firewalld.service
禁止firewall开机启动
sudo systemctl disable firewalld.service