tart / motop

"Top" clone for MongoDB
67 stars 24 forks source link

optimeData KeyError #2

Closed dalanmiller closed 11 years ago

dalanmiller commented 11 years ago

Hello!

I just read about motop on the mongodb website and wanted to give it a try.

When trying to connect to an internal VM running MongoDB on a non-standard port such as hostname:27108, I get the error below. Not sure if the setup is the reason why it's failing or perhaps a newer version of Pymongo?

me@local ~/g/m/motop> python motop.py
Traceback (most recent call last):
  File "motop.py", line 578, in <module>
    queryScreen.action ()
  File "motop.py", line 558, in action
    self.__refresh ()
  File "motop.py", line 522, in __refresh
    ReplicaSetMember.block.reset ([member for replicaSet in self.__replicaSets () if str for member in replicaSet.members ()])
  File "motop.py", line 513, in __replicaSets
    add (server.replicaSet ())
  File "motop.py", line 340, in replicaSet
    lag = replicaSetStatus ['date'] - member ['optimeDate']
KeyError: 'optimeDate'
hasegeli commented 11 years ago

Probably it is because of MongoDB version. I have not tested replicaSets except 2.0. Which version are you using? If it is an old version can you sent me output of "rs.status()" command. It is hard to find changes in old documentation of MongoDB.

You can use the tool by adding "replicaSet = off" to your motop.conf.

hasegeli commented 11 years ago

We do not use replica sets anymore. I would appreciate it you can test it.