我正在尝试将Docker上的BI连接器示例连接到Mongo Atlas中的数据库

lf5gs5x2  于 2022-09-18  发布在  Docker
关注(0)|答案(1)|浏览(204)

我正在尝试不同的方式连接到Mongo Atlas,但这是不可能的。我可能忘记了一些东西,但文档并不是很详细。也许我需要付费才能拥有这个功能?目前,这是我的mongoqld.conf文件:

systemLog:
  path: '/logs/mongosqld.log'
  verbosity: 10
mongodb:
  net:
    uri: 'cluster0-shard-00-02.abcde.mongodb.net:27017/?replicaSet=atlas-24535-shard-0&ssl=true&w=majority&retryWrites=true'
    auth:
      username: "user"
      password: "password"
      mechanism: "SCRAM-SHA-1"
      source: "dbName"
net:
  bindIp: localhost
  port: 3307

security:
  enabled: true

我一直收到这样的错误:

SCHEMA [manager] error initializing schema: unable to execute command: server selection error: context deadline exceeded, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: cluster0-shard-00-02.abcde.mongodb.net:27017, Type: Unknown, Average RTT: 0, Last error: connection() error occured during connection handshake: OCSP verification failed: no OCSP cache provided }, ] }

有什么线索或者你能给我指个正确的方向吗?

我的BI连接器版本是2.14.3,已停靠。

1qczuiv0

1qczuiv01#

启用SSL即可正常工作

net:
    uri: 'cluster0-shard-00-02.abcde.mongodb.net:27017/?replicaSet=atlas-24535-shard-0&ssl=true&w=majority&retryWrites=true' # https://docs.mongodb.com/manual/reference/connection-string/#mongodb-uri
    ssl:
      enabled: true

相关问题