Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48100

"mongo" command line in 4.4.0-rc[0-5] prints TCP Fast Open warning to stdout

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0-rc0, 4.4.0-rc5
    • Component/s: Logging
    • Labels:
      None
    • Security 2020-06-01

      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`).

            Assignee:
            sara.golemon@mongodb.com Sara Golemon
            Reporter:
            tianon Tianon Gravi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: