-
Bug
-
Resolution: Done
-
Major
-
0.3.5
-
None
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.