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

DLC*_*Cry 5 mongodb docker mongodb-biconnector

我正在尝试不同的方法来连接到 Mongo Atlas,但这是不可能的。我可能忘记了一些东西,但文档不是很详细。也许我需要付费才能拥有该功能?目前这是我的 mongosqld.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
Run Code Online (Sandbox Code Playgroud)

我不断收到此错误:

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 Connector 版本是 2.14.3 并且是 dockerized 的。

小智 0

启用S​​SL就可以了

  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
Run Code Online (Sandbox Code Playgroud)