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

MongoDB connector can't connect to sharded cluster

    Details

      Description

      As reported by Dongjun Sun 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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rhauch Randall Hauch
                Reporter:
                rhauch Randall Hauch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: