Comments (13)
Hey @pp0rtal , I'm going to release a new major version of Mongotail, this is the pre-release: 3.0b1.
It adds support to these types and add supports to the new MongoDB driver, if you want to give it a try, update (-U
) your version installed with the --pre
flag:
$ pip3 install -U --pre mongotail
from mongotail.
I just released the 3.0b3 on PyPI and Docker Hub, and I'm pretty sure it's fixed this time
from mongotail.
Thanks @pp0rtal for all your help, version 3.0.0 was released on PyPI and Docker Hub, and it wouldn't be possible without your help.
from mongotail.
@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.
from mongotail.
!Hola @mrsarm!
Thank you so much for handling this issue
- I'd like to give a try but I don't manage do have new logs coming ; I can see my old logs from my first attempts, I'm running a lot of queries in the database I'm running, but nothing new
😕
➜ ~ 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"}
- I don't have upgraded my db since.
and I don't have new logs neither with the docker mongotail version I originally tried in December (docker), I check it's the correct ip / db. Not a bug related to this new version, so😉
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
from mongotail.
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: docker run -it --rm mrsarm/mongotail:3.0b1 192.168.0.39/mydb -f
, and to continue using the last stable version, just don't use the tab or use the tag latest
.
Anyway, there is good stuff in your last feedback, I'm seeing this:
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"}
Which looks like Mongo started to log the killCursors
commands with the C
capitalized, which cause my query that tries to omit these internal operations to be skipped. Note aside, big part of Mongotail work is skip these kind of noise from the Mongo logs that vary from version to version. Could you tell me what exact version of MongoDB are you working with? and on which platform?
If your are not sure, just execute Mongotail with the -i
argument to get the info, e.g. docker run -it --rm mrsarm/mongotail:3.0b1 192.168.0.39/mydb -i
from mongotail.
Hey, just pushed into PyPI and Docker Hub the new beta release 3.0b2.
So changing the version either with pip
or docker
you will be able to test it. It should fix the error mentioned above, although I can't reproduce it, so if you can check it would be great !
from mongotail.
@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
from mongotail.
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 -l
option, or the database doesn't exist yet, but once I enable logging I don't have problem connecting with Mongo 4.2.1 also launched with Docker. You are using the "official" MongoDB images, right? any special launch option when executing "docker run ..." or when configuring it with docker-compose?
from mongotail.
@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")}
You are using the "official" MongoDB images, right?
Actually I'm using circleci/mongo:4.2.1
(the image of my CI), no options, do you think this can be an issue?
from mongotail.
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.
from mongotail.
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
Still no luck with the revision :/
➜ ~ 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")}
from mongotail.
@mrsarm Nice! No more Mongotail EXCEPTION
However, I still don't have any query logged 2021-12-03 13:54:25.630
,
Since December, I didn't do any upgrade on my db (still based on circleci/mongo:4.2.1
).
I can't test MinKey MaxKey obviously, but I'm sure you fixed it.
Probably I should open a new issue (you can close this one) / try to debug a bit before.
from mongotail.
Related Issues (20)
- `Mongotail EXCEPTION - Unknown command operation` when list collection indexes HOT 2
- Doesn't show sort properties HOT 3
- mongotail just closes HOT 12
- CPU runaway using `-f` option HOT 10
- ImportError: cannot import name string_type HOT 2
- list query log don't show HOT 2
- `mongotail [db] --follow` exits after 1 second HOT 7
- No support of bytes/binary data coming from MongDB HOT 7
- Mongotail EXCEPTION - Unknown registry HOT 8
- Error: 'utf8' codec can't decode byte 0x80 (binary field) HOT 3
- Supposed to work with Mongo 4.0.1? HOT 1
- MongoDB Timestamp type is not supported HOT 3
- Mongotail EXCEPTION - Unknown registry HOT 10
- Cannot get queries to log; only DROP and INSERT show in the log HOT 7
- Replace deprecated API methods from PyMongo
- Error parsing command line: Invalid database "portal," HOT 3
- Connection to mongodb atlas not possible HOT 10
- mongotail 3.0.0 not compatible with res-address 2.0.0 HOT 2
- Command values cased as findAndModify or mapReduce cause errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongotail.