Namespace bbdd.collection is a view, not a collection

Hi everyone.

I have an really big trouble trying to make the mk_mongodb.py plugin to work.

Once I had excuted the plugin, i got the following error:
pymongo.errors.OperationFailure: Namespace bbdd.collection is a view, not a collection, full error: {'operationTime': Timestamp(1622260961, 1), 'ok': 0.0, 'errmsg': 'Namespace bbdd.collection is a view, not a collection', 'code': 166, 'codeName': 'CommandNotSupportedOnView', '$clusterTime': {'clusterTime': Timestamp(1622260961, 1), 'signature': {'hash': b'E\xd6P\x03\xcd\xd3)\x06\xadnQQI+\xcb\xb0\x0509\xfc', 'keyId': 6957433774946648065}}}

This happens, because in the collections list, came a “View” and the command “collstats” can’t be done on it. So, if anyone can help me to figure out how to execute the plugin correctly, I really appreciate it.

I got no much experience in Python, so I don’t know how to solve it.

I have all ready modified the line 625 of the original mk_mongodb.py plugin, to add the authentication username and password.

We have a replicat set, and a long time ago, we can use the plugin to list all the collections with their respective information, but now, that’s not happens.

Thanks a lot.

PD: Sorry, if you see a bad transcription.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.