I recently ran into an issue of MongoDB shell commands not working. The error message was:
Invariant failure !driverName.empty() && !driverVersion.empty() && !osType.empty() && !osName.empty() && !osArchitecture.empty() && !osVersion.empty() src/mongo/rpc/metadata/client_metadata.cpp
I ran an strace
on the mongo
command and saw it was trying (and failing) to open the following files: