Hello Ivan.
What PyMongo version are you using?
Hi.Today i've updated my system from 2.0.2 version to 2.2.3. After update i'm receiving various authorisation error on mongos instances. Here are some examples:mongos> show dbsSat Feb 16 05:03:09 uncaught exception: listDatabases failed:{"errmsg" : "exception: runCommand ({ listDatabases: 1 }) on shard (magic_0) failed : { errmsg: \"need to login\", ok: 0.0 }","code" : 13136,"ok" : 0}mongos> sh.status();Sat Feb 16 05:03:30 uncaught exception: group command failed: {"assertion" : "unauthorized db:config ns:config.\u0003cond lock type:0 client:95.x.x.212","assertionCode" : 10057,"errmsg" : "db assertion failure","ok" : 0}mongos> db.settings.update( { _id: "balancer" }, { $set : { stopped: true } } , true );Sat Feb 16 05:04:16 uncaught exception: getlasterror failed: {"errmsg" : "need to login","ok" : 0}mongos> sh.stopBalancer();Waiting for active hosts...Waiting for active host C010.local:27018 to recognize new settings... (ping : Fri Oct 12 2012 01:52:39 GMT+0000 (UTC))Waited for active ping to change for host PRWC010.local:27018, a migration may be in progress or the host may be down.Waiting for active host C013.local:27017 to recognize new settings... (ping : Sat Feb 16 2013 03:33:24 GMT+0000 (UTC))Waited for active ping to change for host PRWC013.local:27017, a migration may be in progress or the host may be down.Waiting for active host C011.wyse:27027 to recognize new settings... (ping : Sat Feb 16 2013 03:32:18 GMT+0000 (UTC))Waited for active ping to change for host PRWC011.wyse:27027, a migration may be in progress or the host may be down.Waiting for the balancer lock...Waiting again for active hosts after balancer is off...Waiting for active host C010.local:27018 to recognize new settings... (ping : Fri Oct 12 2012 01:52:39 GMT+0000 (UTC))Waited for active ping to change for host PRWC010.local:27018, a migration may be in progress or the host may be down.Waiting for active host C013.local:27017 to recognize new settings... (ping : Sat Feb 16 2013 03:33:24 GMT+0000 (UTC))Waited for active ping to change for host PRWC013.local:27017, a migration may be in progress or the host may be down.Waiting for active host C011.wyse:27027 to recognize new settings... (ping : Sat Feb 16 2013 03:32:18 GMT+0000 (UTC))Waited for active ping to change for host PRWC011.wyse:27027, a migration may be in progress or the host may be down.Warning : host PRWC010.local:27018 seems to have been offline since Fri Oct 12 2012 01:52:39 GMT+0000 (UTC)Warning : host PRWC013.local:27017 seems to have been offline since Sat Feb 16 2013 03:33:24 GMT+0000 (UTC)Warning : host PRWC011.wyse:27027 seems to have been offline since Sat Feb 16 2013 03:32:18 GMT+0000 (UTC)Sat Feb 16 05:06:06 uncaught exception: getlasterror failed: {"singleShard" : "mp.xxx.com:27019,85.x.x.217:27018,62.x.x.210:27018","errmsg" : "need to login","ok" : 0}And some from python:File "/usr/home/vp/python/lib/python2.7/site-packages/pymongo/collection.py", line 913, in ensure_indexraise OperationFailure(msg % errmsg)pymongo.errors.OperationFailure: need to loginreturn self.create_index(key_or_list, cache_for, **kwargs)File "/usr/home/vp/python/lib/python2.7/site-packages/pymongo/collection.py", line 821, in create_index**self._get_wc_override())File "/usr/home/vp/python/lib/python2.7/site-packages/pymongo/collection.py", line 359, in insertcontinue_on_error, self.__uuid_subtype), safe)File "/usr/home/vp/python/lib/python2.7/site-packages/pymongo/mongo_client.py", line 844, in _send_messagerv = self.__check_response_to_last_error(response)File "/usr/home/vp/python/lib/python2.7/site-packages/pymongo/mongo_client.py", line 765, in __check_response_to_last_errorhelpers._check_command_response(error, self.disconnect)File "/usr/home/vp/python/lib/python2.7/site-packages/pymongo/helpers.py", line 147, in _check_command_responseraise OperationFailure(msg % errmsg)pymongo.errors.OperationFailure: need to loginDuring update procedure i've forgotten to stop balancer. I'm not using user based authorization, just keyfiles. Keyfiles are the same on all machines.The system worked on production before update without any db-related problems. There are two shards each of them is replica set made from 3 replicas. Please, help.--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
---
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.
For more options, visit https://groups.google.com/groups/opt_out.
It's strange. I had similar problems 5 months ago, I was using PyMongo 2.2 with MongoDB 2.1.
With the help from Bernie and Jesse, I can understand that the solution was to update PyMongo's version.
Look this Jira case:
https://jira.mongodb.org/browse/PYTHON-371