-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash for queries containing MaxKey
/ MinKey
#35
Comments
@pp0rtal sorry for the delay to respond, and thanks for your report. I just confirmed the error reproducing it locally. I'll provide a fix soon. |
!Hola @mrsarm!
➜ ~ mongotail --version
mongotail 3.0b1 <https://github.com/mrsarm/mongotail> (python 2.7.18)
➜ ~ mongotail localhost/mydb -f
2021-12-03 13:54:25.621 DISTINCT [groups] : "_id", {"$or": [{"users": ObjectId("5fa80a75b401a755a321c8b5")}], "sys": {"$ne": "hello"}}
...
2021-12-03 13:54:25.630 AGGREGATE [projects] : [{"$match": {"learningNeed": ObjectId("61795e026b8b4b6f553e1863")}}, {"$limit": 1}, {"$group": {"_id": 1, "n": {"$sum": 1}}}]
Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "360Learning.courses", "command": {"$db": "360Learning", "killCursors": "courses", "cursors": [4530188732135917703]}, "ts": ISODate("2021-12-03T14:34:19.517Z"), "op": "command"}
docker run -it --rm mrsarm/mongotail 192.168.0.39/mydb -f
2021-12-03 13:54:25.630 ... I must be doing something wrong, I'll give a new try later |
Thanks @pp0rtal for your feedback ! About Docker, I've published the latest beta on Docker Hub, but because it's not a final version I didn't make the "latest" tag points to it, so in order to run the beta with Docker you have to run it with the version tag: Anyway, there is good stuff in your last feedback, I'm seeing this:
Which looks like Mongo started to log the If your are not sure, just execute Mongotail with the |
Hey, just pushed into PyPI and Docker Hub the new beta release 3.0b2. So changing the version either with |
@mrsarm Sorry for the delay (again) My MongoDb server is 4.2.1 on Ubuntu (my database is running in a container) docker run -it --rm mrsarm/mongotail:3.0b2 192.168.0.39/mydb -i
Unable to find image 'mrsarm/mongotail:3.0b2' locally
3.0b2: Pulling from mrsarm/mongotail
5eb5b503b376: Pull complete
5c69ac0246d0: Pull complete
2bd4622f6a75: Pull complete
3afb63acb482: Pull complete
9836c3fb0d13: Pull complete
7d45bd3427da: Pull complete
Digest: sha256:219ab66601b3acd4a0bb27d43b7600191feb65d1d8b3a8429d286b6cb9fc6f97
Status: Downloaded newer image for mrsarm/mongotail:3.0b2
Version: 4.2.1
Distribution: x86_64
Target OS: linux
OpenSSL running: OpenSSL 1.1.1 11 Sep 2018
Max BSON Object Size: 16777216
Debug: False
Javascript Engine: mozjs I'm not sure what happens here, the software is closing ➜ ~ docker run -it --rm mrsarm/mongotail:3.0b1 192.168.0.39/360Learning -f
➜ ~ echo $?
0 I do have the exact same behavior with the docker packaged version docker run -it --rm mrsarm/mongotail 192.168.0.39/360Learning -f
2021-12-03 13:54:25.621 DISTINCT [groups] : "_id", {"$or": [{"users": ObjectId("5fa80a75b401a755a321c8b5")}], "sys": {"$ne": "marketplace"}}
2021-12-03 13:54:25.624 QUERY [groups] : {"company": ObjectId("54bd005142c39aba01ffd999"), "sys": "others"}. 1 returned.
2021-12-03 13:54:25.624 QUERY [learningNeeds] : {"_id": ObjectId("61795e026b8b4b6f553e1863")}. 1 returned.
2021-12-03 13:54:25.625 DISTINCT [upvotes] : "author", {"learningNeed": ObjectId("61795e026b8b4b6f553e1863")}
2021-12-03 13:54:25.627 DISTINCT [upvotes] : "author", {"learningNeed": ObjectId("61795e026b8b4b6f553e1863")}
2021-12-03 13:54:25.628 DISTINCT [posts] : "_id", {"target._id": {"$in": [ObjectId("61795e026b8b4b6f553e1863")]}}
2021-12-03 13:54:25.628 AGGREGATE [posts] : [{"$match": {"target.collection": "posts", "target._id": {"$in": [ObjectId("61795e415b53e57c9d935775"), ObjectId("61795e8a50dc6808e5039018"), ObjectId("61795f1da33bd07d29ea7aee")]}}}, {"$group": {"_id": 1, "n": {"$sum": 1}}}]
2021-12-03 13:54:25.629 AGGREGATE [projects] : [{"$match": {"learningNeed": ObjectId("61795e026b8b4b6f553e1863")}}, {"$limit": 1}, {"$group": {"_id": 1, "n": {"$sum": 1}}}]
2021-12-03 13:54:25.630 AGGREGATE [projects] : [{"$match": {"learningNeed": ObjectId("61795e026b8b4b6f553e1863")}}, {"$limit": 1}, {"$group": {"_id": 1, "n": {"$sum": 1}}}]
Mongotail EXCEPTION - Unknown command operation
Dump: {"op": "command", "ns": "360Learning.courses", "command": {"killCursors": "courses", "cursors": [4530188732135917703], "$db": "360Learning"}, "ts": ISODate("2021-12-03T14:34:19.517Z")}
Mongotail EXCEPTION - Unknown registry
Dump: {"op": "command", "ns": "360Learning.courses", "command": {"killCursors": "courses", "cursors": [4530188732135917703], "$db": "360Learning"}, "ts": ISODate("2021-12-03T14:34:19.517Z")} If you need more info to reproduce the error / a dump file I can provide I will do |
Thanks @pp0rtal ! I got the same "empty" output with the connection immediately closed if I didn't set the log level to 1 or 2 before trying to access the DB with the |
@mrsarm My bad about the service closing, I switched my network and IP was invalid at this moment 🤦♂️ So I retried with --rm and still have exceptions docker run -it --rm mrsarm/mongotail:3.0b1 192.168.0.105/360Learning -f
...
Mongotail EXCEPTION - Unknown command operation
Dump: {"op": "command", "ns": "360Learning.courses", "command": {"killCursors": "courses", "cursors": [4530188732135917703], "$db": "360Learning"}, "ts": ISODate("2021-12-03T14:34:19.517Z")}
Mongotail EXCEPTION - Unknown registry
Dump: {"op": "command", "ns": "360Learning.courses", "command": {"killCursors": "courses", "cursors": [4530188732135917703], "$db": "360Learning"}, "ts": ISODate("2021-12-03T14:34:19.517Z")}
Actually I'm using |
Thanks @pp0rtal !! good to know I'm not introducing a new bug related with connections while fixing others 😅 About your recent error, it's because you are using the tag 3.0b1, but you should use 3.0b2 instead. |
@mrsarm sorry I'm not focused 😬 ➜ ~ docker run -it --rm mrsarm/mongotail:3.0b2 192.168.0.105/360Learning -f
...
2021-12-03 13:54:25.630 AGGREGATE [projects] : [{"$match": {"learningNeed": ObjectId("61795e026b8b4b6f553e1863")}}, {"$limit": 1}, {"$group": {"_id": 1, "n": {"$sum": 1}}}]
Mongotail EXCEPTION - Unknown command operation
Dump: {"op": "command", "ns": "360Learning.courses", "command": {"killCursors": "courses", "cursors": [4530188732135917703], "$db": "360Learning"}, "ts": ISODate("2021-12-03T14:34:19.517Z")}
Mongotail EXCEPTION - Unknown registry
Dump: {"op": "command", "ns": "360Learning.courses", "command": {"killCursors": "courses", "cursors": [4530188732135917703], "$db": "360Learning"}, "ts": ISODate("2021-12-03T14:34:19.517Z")} |
I just released the 3.0b3 on PyPI and Docker Hub, and I'm pretty sure it's fixed this time 🤞 |
@mrsarm Nice! No more However, I still don't have any query logged 😕 the latest is from I can't test MinKey MaxKey obviously, but I'm sure you fixed it. |
* Add support to the new PyMongo driver version 4.0 (#34) * Add support to the types `MinKey` / `MaxKey` from MongoDB (#35) * Remove deprecated _~SSL~_ arguments in favor of the new _TLS_ arguments * Remove support to Python 2.6, 3.3, and 3.4 * Fix when a query fails Mongo doesn't record `nreturned` (number of record returned) * Fix Mongo logs `killcursors` operations with different cases causing exception when parsing logs
* Add support to the new PyMongo driver version 4.0 (#34) * Add support to the types `MinKey` / `MaxKey` from MongoDB (#35) * Remove deprecated _~SSL~_ arguments in favor of the new _TLS_ arguments * Remove support to Python 2.6, 3.3, and 3.4 * Fix when a query fails Mongo doesn't record `nreturned` (number of record returned) * Fix Mongo logs `killcursors` operations with different cases causing exception when parsing logs
MaxKey
looks problematicThis will break the
Note I did not tried with all 20+ Mongodb types https://docs.mongodb.com/manual/reference/operator/query/type/
The text was updated successfully, but these errors were encountered: