Help! MongoDB nonresponsive to Pymongo


#1

If I look on the wrong port, I get

>>> c = pymongo.Connection(port=2704) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/var/lib/python-support/python2.5/pymongo/connection.py", line 163, in __init__ self.__find_master() File "/var/lib/python-support/python2.5/pymongo/connection.py", line 364, in __find_master raise ConnectionFailure(e) pymongo.errors.ConnectionFailure: (111, 'Connection refused')

If I look on the right port, I get

>>> c = pymongo.Connection(port=27017)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/pymongo/connection.py", line 163, in __init__
    self.__find_master()
  File "/var/lib/python-support/python2.5/pymongo/connection.py", line 334, in __find_master
    master = self.__master(sock)
  File "/var/lib/python-support/python2.5/pymongo/connection.py", line 219, in __master
    result = self["admin"]._command({"ismaster": 1}, sock=sock)
  File "/var/lib/python-support/python2.5/pymongo/database.py", line 200, in _command
    _must_use_master=True)
  File "/var/lib/python-support/python2.5/pymongo/collection.py", line 345, in find_one
    _must_use_master=_must_use_master):
  File "/var/lib/python-support/python2.5/pymongo/cursor.py", line 480, in next
    if len(self.__data) or self._refresh():
  File "/var/lib/python-support/python2.5/pymongo/cursor.py", line 456, in _refresh
    self.__query_spec(), self.__fields))
  File "/var/lib/python-support/python2.5/pymongo/cursor.py", line 424, in __send_message
    response = helpers._unpack_response(response, self.__id)
  File "/var/lib/python-support/python2.5/pymongo/helpers.py", line 98, in _unpack_response
    assert response_flag == 0
AssertionError

Yesterday I was able to connect just fine. And it has nothing to do with authentication, which should only come in at the db level (I dealt with that and got it all working fine.) I tried deactivating and reactivating MongoDB, but the root password is exactly the same so I suspect nothing was really uninstalled or reinstalled. Could somebody please fix the configuration of this? Or tell me how I can do it myself? I think the best thing to do is just reinstall MongoDB since I have nothing on it right now.[hr]
Looks like it was actually a bug in the (old) version of pymongo that was installed: