我在通过rockmongo连接到地图集(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终端连接。所以与地图集的联系有效,但是当我通过rockmongoo尝试mongodb地图集时,它就会出现错误
Unable to connect MongoDB, please check your configurations. MongoDB said:No candidate servers found.
答案 0 :(得分:1)
根本原因是RockMongo客户端缺乏SSL支持。建议使用Atlas的另一个webclient。