Does this mean that a mongos 6.0 instance should be able to connect to a mongodb 4.4 sharded cluster since the sharded cluster’s FCV (4.4) is less tha 6.0? Sorry if this is an obvious/dumb question.
In fact no, this is not the case. mongos need to be the same version as the mongod.
mongos can be a major version below the rest of the sharded cluster, during a version upgrade mongos is the last component to be upgraded before upgrading the FCV.
If you upgrade or use a mongos version higher than that of the cluster you’re likely to see mongos not connecting to the shard and config replica sets.
{
"t": {
"$date": "2022-11-05T18:20:19.555+00:00"
},
"s": "I",
"c": "NETWORK",
"id": 4712102,
"ctx": "ReplicaSetMonitor-TaskExecutor",
"msg": "Host failed in replica set",
"attr": {
"replicaSet": "c0",
"host": "mongo-c-a:27019",
"error": {
"code": 188,
"codeName": "IncompatibleServerVersion",
"errmsg": "remote host has incompatible wire version: Server min and max wire version (9,9) is incompatible with client min wire version (13,13).You (client) are attempting to connect to a node (server) with a binary version with which you (client) no longer accept connections. Please upgrade the server’s binary version."
},
"action": {
"dropConnections": false,
"requestImmediateCheck": false,
"outcome": {
"host": "mongo-c-a:27019",
"success": false,
"errorMessage": "IncompatibleServerVersion: remote host has incompatible wire version: Server min and max wire version (9,9) is incompatible with client min wire version (13,13).You (client) are attempting to connect to a node (server) with a binary version with which you (client) no longer accept connections. Please upgrade the server’s binary version."
}
}
}
}