hi everyone, I am finding it difficult to connect ...
# announcements
a
hi everyone, I am finding it difficult to connect to MongoDB. I will sincerely appreciate any form of help..
c
hi! can you share what error you're getting please? it would also help if you shared the version of airbyte you're using and the version of the mongo db connector that you're using.
definitely happy to help!
a
Copy code
2021-04-26 21:43:05 INFO (/tmp/workspace/28d8a507-4b2a-4aae-9fc4-40194fcb1fda/0) TemporalAttemptExecution(get):104 - Executing worker wrapper. Airbyte version: 0.21.1-alpha
2021-04-26 21:43:05 INFO (/tmp/workspace/28d8a507-4b2a-4aae-9fc4-40194fcb1fda/0) LineGobbler(voidCall):69 - Checking if airbyte/source-mongodb:0.3.0 exists...
2021-04-26 21:43:05 INFO (/tmp/workspace/28d8a507-4b2a-4aae-9fc4-40194fcb1fda/0) LineGobbler(voidCall):69 - airbyte/source-mongodb:0.3.0 was found locally.
2021-04-26 21:43:06 INFO (/tmp/workspace/28d8a507-4b2a-4aae-9fc4-40194fcb1fda/0) DefaultAirbyteStreamFactory(internalLog):110 - /usr/local/bundle/gems/mongo-2.14.0/lib/mongo/uri.rb:447:in `raise_invalid_error!'
/usr/local/bundle/gems/mongo-2.14.0/lib/mongo/uri.rb:346:in `parse!'
/usr/local/bundle/gems/mongo-2.14.0/lib/mongo/uri.rb:298:in `initialize'
/usr/local/bundle/gems/mongo-2.14.0/lib/mongo/uri.rb:238:in `new'
/usr/local/bundle/gems/mongo-2.14.0/lib/mongo/uri.rb:238:in `get'
/usr/local/bundle/gems/mongo-2.14.0/lib/mongo/client.rb:438:in `initialize'
/airbyte/lib/mongodb_source.rb:73:in `new'
/airbyte/lib/mongodb_source.rb:73:in `client'
/airbyte/lib/mongodb_source.rb:24:in `check'
/airbyte/source.rb:16:in `public_send'
/airbyte/source.rb:16:in `<main>'
2021-04-26 21:43:06 INFO (/tmp/workspace/28d8a507-4b2a-4aae-9fc4-40194fcb1fda/0) TemporalAttemptExecution(get):124 - Stopping cancellation check scheduling...
"The connection tests failed. Authentication failed"
Thanks @charles. The funny thing is that I tried using same credential on Navicat and it was fine. Maybe I don't know how to do same on airbyte or my uri is not well constructed
c
i'm looking in the code where that error is thrown.
looks like
Copy code
uri = "mongodb://#{@config['user']}:#{@config['password']}@#{@config['host']}:#{@config['port']}/#{@config['database']}?authSource=#{@config['auth_source']}"
is how we parse the uri
based on the values your inputting in the UI do they make sense in the context of how this string is parsing them?
a
yes
i supplied all the value as requested
what is authentication source?
c
i think it's like database name?
(i very unfamiliar with mongo, so i'm learning as i go)
a
ok thanks
i am grateful