Cannot connect to Mongodb

15 views (last 30 days)
aleena n a
aleena n a on 8 Nov 2021
Edited: aleena n a on 9 Nov 2021
Hello everyone,
I am trying to connect to mongodb. I can establish the connection with just sever and port. To insert documnent I was asked to input username and password. But whenever I try to connect with username and password it shows an error. How to solve this? I am using Matlab R2019a version.
[Mongo Driver Error]:Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN,
servers=[{address=xxxxxxxx, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException:
Exception authenticating MongoCredential{mechanism=null, userName='xxx', source='RadarDatabase', password=<hidden>,
mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication
failed.' on server xxxxxxxx. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" :
18, "codeName" : "AuthenticationFailed" }}}].

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!