mongodb 图集-rockmongo

mongodb atlas - rockmongo

我在通过 rockmongo 连接到 atlas (mongodb) 时遇到了很大的问题。

这是我的配置。

$MONGO["servers"][$i]["mongo_options"] = array("replicaSet" => "LuxeMassage-shard-0");
$MONGO["servers"][$i]["mongo_name"] = "LuxeMassage Cluster";//mongo server name
$MONGO["servers"][$i]["mongo_host"] = "mongodb://luxemassage-shard-00-00-0kahc.mongodb.net:27017,luxemassage-shard-00-01-0kahc.mongodb.net:27017,luxemassage-shard-00-02-0kahc.mongodb.net:27017/admin?replicaSet=LuxeMassage-shard-0";//mongo host
$MONGO["servers"][$i]["mongo_port"] = "27017";//mongo port
$MONGO["servers"][$i]["mongo_timeout"] = 0;//mongo connection timeout
//$MONGO["servers"][$i]["mongo_db"] = "MONGO_DATABASE";//default mongo db to connect, works only if mongo_auth=false
//$MONGO["servers"][$i]["mongo_user"] = "MONGO_USERNAME";//mongo authentication user name, works only if mongo_auth=false
//$MONGO["servers"][$i]["mongo_pass"] = "MONGO_PASSWORD";//mongo authentication password, works only if mongo_auth=false
$MONGO["servers"][$i]["mongo_auth"] = true;//enable mongo authentication?

$MONGO["servers"][$i]["control_auth"] = false;//enable control users, works only if mongo_auth=false
//$MONGO["servers"][$i]["control_users"]["admin"] = "admin";//one of control users ["USERNAME"]=PASSWORD, works only if mongo_auth=false

$MONGO["servers"][$i]["ui_only_dbs"] = "";//databases to display
$MONGO["servers"][$i]["ui_hide_dbs"] = "";//databases to hide
$MONGO["servers"][$i]["ui_hide_collections"] = "";//collections to hide
$MONGO["servers"][$i]["ui_hide_system_collections"] = false;//whether hide the system collections

我已经允许IP地址加入白名单,所以我可以通过ssh终端连接。所以连接到 atlas 是有效的,但是当我通过 rockmongoo 尝试 mongodb atlas 时,它会出现错误

Unable to connect MongoDB, please check your configurations. MongoDB said:No candidate servers found.

根本原因是 RockMongo 客户端缺少 SSL 支持。推荐使用 Atlas 的另一个网络客户端。