无法使用MongoClient连接到mongoldb

时间:2019-01-24 12:53:02

标签: mongodb

我想连接到mongoldb,但无法连接,知道吗?

In [23]: uri = "mongodb://127.0.39.1:27018/"

In [24]: client = MongoClient(uri,
                 ssl=True,
                 ssl_ca_certs='/opt/ampli/cfg/ssl/.ca.crt')

In [25]:

In [25]: db_csgdb_leader = client.csgdb_leader

In [26]: db_csgdb_leader.buckets.count()

我遇到以下错误

ServerSelectionTimeoutError: hostname '127.0.39.1' doesn't match u'mongodb_d6c0e079-d8ed-427b-8b79-7b477b9978e6'

我做错什么了吗?

0 个答案:

没有答案
相关问题