Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-170

MongoDB connector can't connect to sharded cluster

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 0.3.6, 0.4
    • 0.3.5
    • mongodb-connector
    • None

    Description

      As reported by sean171_jira in the dev chat room, the connector is able to connect to the configuration replica set of a sharded cluster, but when the task is started the connector fails to connect to the MonoDB primary node since it does not have the config database.

      The ConnectionContext constructor currently sets up the MongoDB client with credentials for the admin and config databases, and apparently the client "eagerly performs authentication against all databases passed in, rather than doing this lazily as DBs are use." (See this issue for details.)

      A "workaround" is to comment out the code that sets up the credentials for the config database and to only use the admin database for authentication and authorization. This works as long as the user specified in the connector configuration can read the config database.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: