[SERVER-48100] "mongo" command line in 4.4.0-rc[0-5] prints TCP Fast Open warning to stdout Created: 11/May/20  Updated: 27/May/20  Resolved: 27/May/20

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 4.4.0-rc0, 4.4.0-rc5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tianon Gravi Assignee: Sara Golemon
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-46932 Shell produces json output Closed
Sprint: Security 2020-06-01
Participants:

 Description   

In versions before 4.4, we've been using `mongo --quiet --eval '...'` as a way to run simple Javascript expressions against a MongoDB instance for querying in shell scripts, and that has been very successful and prior to 4.4 the output to standard output (which is then capturable in the shell script) has been limited to just the result of the expression (`db.test.count()` would return just a single number, etc).

In 4.4 (following https://jira.mongodb.org/browse/SERVER-44676 & https://github.com/mongodb/mongo/commit/8189e058304baa734ea892b69c37d16021e17a2f), this behavior changed such that we get an additional (unexpected) warning to standard output about TCP Fast Open, and the warning itself comes in Javascript format, presumably because it was intended for output to the daemon logs (where it also appears on 4.4+):

{"t":{"$date":"2020-03-04T23:26:42.849Z"},"s":"I", "c":"NETWORK", "id":23014,"ctx":"main","msg":"{foStatus_reason}","attr":{"foStatus_reason":"TCP FastOpen support requested, but disabled in kernel. Set /proc/sys/net/ipv4/tcp_fastopen to 3"}}

Now, we can use something like `grep` to ignore the warning, but IMO it should probably either go to standard error instead, or not show up in the output of the `mongo` CLI tool at all (especially when using `--quiet`).



 Comments   
Comment by Sara Golemon [ 27/May/20 ]

Hah! Yep. I was just on my way back here to report the same.

Closing as duplicate. Thanks again for the report though!

Comment by Tianon Gravi [ 27/May/20 ]

It appears that this has been fixed in 4.4.0-rc7, and looking through the commits I found https://jira.mongodb.org/browse/SERVER-46932 which I'm fairly sure this one is actually a duplicate of. 

Comment by Kelsey Schubert [ 11/May/20 ]

Thank you for the report, tianon!

Comment by Ryan Chipman [ 11/May/20 ]

moving to the SERVER project, since mongo is not part of the DB tools

Generated at Thu Feb 08 05:16:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.