Forum Discussion

da1n3s3's avatar
da1n3s3
New Contributor
7 years ago

Connecting to a mongodb database version 3.6 or higher

I have read the read the knowledge base entry on connecting to a mongodb database. It works for a database version 3.4.14 with java driver 3.0.3. When trying to connect to database version 3.6.x with java driver 3.6.3 I get 

"2018-04-09 08:26:18.975 - Error getting response;
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches 
ReadPreferenceServerSelector{readPreference=primary}. 
Client view of cluster state is {type=UNKNOWN, servers=[{address=m001-sandbox-shard-00-00-wnkb7.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, 
exception={com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='m001-student', source='video', password=<hidden>, mechanismProperties={}}}, 
caused by {com.mongodb.MongoCommandException: 
Command failed with error 8000: 'Authentication failed.' on server m001-sandbox-shard-00-00-wnkb7.mongodb.net:27017. 
The full response is { "ok" : 0, "errmsg" : "Authentication failed.", "code" : 8000, "codeName" : "AtlasError" }}}]. The credentials are correct.
"
No RepliesBe the first to reply