Pedro Diogo
2015-12-22 13:36:06 UTC
Hello everybody,
I am trying to authenticate to my replica set, which was deployed via Mongo
Cloud Manager, but I can not figure out why it fails.
Here are my users on database *abcd*:
abcdRepliaSet:PRIMARY> use abcd
switched to db abcd
show users
abcdRepliaSet:PRIMARY> show users
{
"_id" : "abcd.abcdAppUser",
"user" : "abcdAppUser",
"db" : "abcd",
"roles" : [
{
"role" : "readWrite",
"db" : "abcd"
}
]
}
and I can successfully connect to it via mongo shell:
mongo adbcd-mongo-mms.cloudapp.net:57002 -u adbcd AppUser -p hidden --authenticationDatabase
adbcd
However, I can not using this simple code:
MongoClient.connect("mongodb://abcd
AppUser:***@abcd-mongo-mms.cloudapp.net:57001,abcd-mongo-mms.cloudapp.net:57002,abcd-mongo-mms.cloudapp.net:57003/abcd?replicaSet=
abcdRepliaSet&authSource=abcd&authMechanism=SCRAM-SHA-1",
function(err, db) {
if(err) throw err;
else console.log(db);
});
I am also pretty sure my authMechanism is SCRAM-SHA-1 as I've added the
user using mongoldb v. 3.0.7 and I've also confirmed it using:
db.system.users.find({user:"abcdAppUser"}).pretty()
Here is mongod's log when I try to auth via the nodejs app:
2015-12-22T13:31:33.823+0000 I ACCESS [conn30286] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:33.894+0000 I ACCESS [conn30288] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.051+0000 I ACCESS [conn30287] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.124+0000 I ACCESS [conn30289] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.206+0000 I ACCESS [conn30290] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.263+0000 I NETWORK [conn30288] end connection 94.61.
85.76:53102 (17 connections now open)
2015-12-22T13:31:34.264+0000 I NETWORK [conn30286] end connection 94.61.
85.76:61293 (17 connections now open)
2015-12-22T13:31:34.263+0000 I NETWORK [conn30287] end connection 94.61.
85.76:58194 (17 connections now open)
2015-12-22T13:31:34.263+0000 I NETWORK [conn30289] end connection 94.61.
85.76:58537 (17 connections now open)
2015-12-22T13:31:34.264+0000 I NETWORK [conn30290] end connection 94.61.
85.76:57720 (13 connections now open)
2015-12-22T13:31:37.185+0000 I NETWORK [conn30281] end connection 10.0.0.8:
34322 (12 connections now open)
I also made sure my node.js driver was compatible with SCRAM and it is. At
this point, I can't really understand why it fails... Any help would be
most welcome!
Thank you in advance.
Regards,
Pedro
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7265afc0-a6a1-4cf1-b142-81fcedd79c70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I am trying to authenticate to my replica set, which was deployed via Mongo
Cloud Manager, but I can not figure out why it fails.
Here are my users on database *abcd*:
abcdRepliaSet:PRIMARY> use abcd
switched to db abcd
show users
abcdRepliaSet:PRIMARY> show users
{
"_id" : "abcd.abcdAppUser",
"user" : "abcdAppUser",
"db" : "abcd",
"roles" : [
{
"role" : "readWrite",
"db" : "abcd"
}
]
}
and I can successfully connect to it via mongo shell:
mongo adbcd-mongo-mms.cloudapp.net:57002 -u adbcd AppUser -p hidden --authenticationDatabase
adbcd
However, I can not using this simple code:
MongoClient.connect("mongodb://abcd
AppUser:***@abcd-mongo-mms.cloudapp.net:57001,abcd-mongo-mms.cloudapp.net:57002,abcd-mongo-mms.cloudapp.net:57003/abcd?replicaSet=
abcdRepliaSet&authSource=abcd&authMechanism=SCRAM-SHA-1",
function(err, db) {
if(err) throw err;
else console.log(db);
});
I am also pretty sure my authMechanism is SCRAM-SHA-1 as I've added the
user using mongoldb v. 3.0.7 and I've also confirmed it using:
db.system.users.find({user:"abcdAppUser"}).pretty()
Here is mongod's log when I try to auth via the nodejs app:
2015-12-22T13:31:33.823+0000 I ACCESS [conn30286] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:33.894+0000 I ACCESS [conn30288] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.051+0000 I ACCESS [conn30287] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.124+0000 I ACCESS [conn30289] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.206+0000 I ACCESS [conn30290] SCRAM-SHA-1
authentication failed for abcdAppUser on abcd from client 10.0.0.10 ;
AuthenticationFailed SCRAM-SHA-1 authentication failed, storedKey mismatch
2015-12-22T13:31:34.263+0000 I NETWORK [conn30288] end connection 94.61.
85.76:53102 (17 connections now open)
2015-12-22T13:31:34.264+0000 I NETWORK [conn30286] end connection 94.61.
85.76:61293 (17 connections now open)
2015-12-22T13:31:34.263+0000 I NETWORK [conn30287] end connection 94.61.
85.76:58194 (17 connections now open)
2015-12-22T13:31:34.263+0000 I NETWORK [conn30289] end connection 94.61.
85.76:58537 (17 connections now open)
2015-12-22T13:31:34.264+0000 I NETWORK [conn30290] end connection 94.61.
85.76:57720 (13 connections now open)
2015-12-22T13:31:37.185+0000 I NETWORK [conn30281] end connection 10.0.0.8:
34322 (12 connections now open)
I also made sure my node.js driver was compatible with SCRAM and it is. At
this point, I can't really understand why it fails... Any help would be
most welcome!
Thank you in advance.
Regards,
Pedro
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7265afc0-a6a1-4cf1-b142-81fcedd79c70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.