Mongos 4.4.0 exception after upgrading from 4.2.7

Hey there,
I am trying to update a sharded cluster from 4.2.7 to 4.4.0.

So far I have updated the config and shard replica sets without any issue.

But when updating the mongos instances I get the Following exception:

{"t":{"$date":"2020-08-17T20:48:55.000+00:00"},"s":"F",  "c":"CONTROL",  "id":4757800, "ctx":"ftdc","msg":"Writing fatal message","attr":{"message":"DBException::toString(): NonExistentPath: \"/dev/stdout.diagnostic.data\" could not be created: Permission denied\nActual exception type: mongo::error_details::ExceptionForImpl<(mongo::ErrorCodes::Error)29, mongo::AssertionException>\n"}}

My systemLog config looks like this:

systemLog:
    destination: file
    logAppend: true
    path: /dev/stdout

I am using /dev/stdout as I am running my mongod and mongos instances within docker containers. From the exception it seems that mongo is trying to create a file at /dev/stdout.diagnostic.data which obviously doesn’t work. Not sure what changed between 4.2.7 and 4.4.0 that broke this for me, as the only thing I have changed in my configuration is the mongo server version.

Anybody any insight on how to fix this?

Hi @Jascha_Brinkmann,

The systemLog.path expect a full file destination and not just a path:
https://docs.mongodb.com/manual/reference/configuration-options/#file-format

Its not something new and for quite sometime it also create the diagnostic directory under that parent directory.

We suggest using the syslog option to centrelize logs rather then stdout.

Best
Pavel

1 Like