on debugging the mongodb source code i found out thatcommand::findCommand( commandName) in commands_public.cpp is not returning "getnonce" command from authentication commands list. m using mongodb 2.4.6 and windows 8 64bit with vs2010.
need urgent help please
p.s: this issue is only happening in visual studio build of mongodb and not in scons one.
It sounds like you built this mongo installation yourself from source?
It built on this platform without any errors? Is every component
you are running (mongod's mongos's) the same version?
By the way, what's the reason you're building yourself and not just
using the binaries being distributed for various platforms?
It built on this platform without any errors? Is every component
you are running (mongod's mongos's) the same version?
By the way, what's the reason you're building yourself and not just
using the binaries being distributed for various platforms?
yes, i build this mongo installation myself from source code and it was building fine without any errors.. all commands on mongos are running fine with auth/keyfile disabled and all mongods are working fine withauth enabled since i've tested them (mongods) by connecting directly to them through shell.
yes, All the other components (mongods and mongo) are also of this version. I have actually modified mongodb source code (which is in c++) for my thesis project and added some extra functionality to its sharding features. BTW i have also tried to compile other version of mongodb (v2.4.10) and its mongos is also giving the same error.
You can't use different level of auth/keyfile on different components
of the cluster - somehow I'm reading this as mongos running without
auth and mongod running with auth? Or did I misunderstand?
of the cluster - somehow I'm reading this as mongos running without
auth and mongod running with auth? Or did I misunderstand?
Let me tell you my exact steps with their resulted output
1. compiled mongodb2.4.6 source code in vs2010 [result: successful compilation]
2. set up a cluster with 1 config server, 1 mongos and 2 shards on localhost without enabling auth [result: successful execution of all commands]
3. created a single keyfile using openssl [result: keyfile generated]
4. created ".conf" file for each component of the cluster with auth=true and keyfile in config server and shard configuration files. we do not need to set auth=true in mongos conf file since setting keyfile automatically enable auth.....from what i have read in mongodb documents.
5. connected mongo shell with mongos of the cluster using localhost exception [result: successful connection]
6. add shards, switch to admin database, create user using db.addUser command [result: user successfully created]
7. while still in admin database, run command db.auth("username","password") [result: error: 18 getnonce failed: { ok:0.0 , errmsg: "no such cmd: getnonce" } 0 ]
but when i only replaced the visual studio build of mongos with its scons build (both are of v2.4.6), everything started working fine.
댓글 없음:
댓글 쓰기