witty-keyboard-20400
11/03/2021, 12:12 PMconnect_uri: "<mongodb://dbuser1>:xyz123#$$!us@192.168.1.100:27017/mongodbName?authSource=mongodbName"
The above mentioned username and password are correct, which I verified using Robo 3T client.
When I try to ingest the metadata using the command
datahub ingest -c ./mongodb.yml
It fails with the following auth error:
all_credentials = {'mongodbName': MongoCredential ('SCRAM-SHA-1', 'mongodbName', 'dbuser1', 'xyz123#14911!us', None, <pymongo.auth._Cache object at 0x7ff8d7b91d00>, )
...
credentials = MongoCredential ('SCRAM-SHA-1', 'mongodbName', 'dbuser1', 'xyz123#14911!us', None, <pymongo.auth._Cache object at 0x7ff8d7b91d00>, )
...
...
OperationFailure: Authentication failed., full error: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed', 'operationTime': Timestamp(1635941323, 2), '$clusterTime': {'clusterTime': Timestamp(1635941323, 2), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}}
Notice that the password provided by me in the yml file is:
xyz123#$$!us
..while the password in the log statements are shown as:
xyz123#14911!us
Why is this happening?
Is this a bug? Or am I missing something here? @big-carpet-38439 @miniature-tiger-96062mammoth-bear-12532
$ sign makes us think you have a variable in there. The way to get around this is to escape the $ so use \$ or else just use an env variable for the value in the recipe. e.g. connect_uri: ā<mongodb://host_name:$%7BMONGO_PASS%7D/|mongodb://host_name:${MONGO_PASS}/>ā¦āwitty-keyboard-20400
11/03/2021, 2:12 PM