diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-02-22 00:39:28 -0500 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-02-27 22:31:05 -0500 |
commit | cc4cb29486a87598d7b490c53712d06085e5cf91 (patch) | |
tree | 1b81a7306381ad3bcad898a4c91ad12215bbc492 /src/mongo/rpc | |
parent | ce91d96dc6fe04db3327653c145a54b3768a88ac (diff) | |
download | mongo-cc4cb29486a87598d7b490c53712d06085e5cf91.tar.gz |
SERVER-33260 Log more helpful messages for FCV-related IncompatibleServerVersion errors
Diffstat (limited to 'src/mongo/rpc')
-rw-r--r-- | src/mongo/rpc/protocol.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mongo/rpc/protocol.cpp b/src/mongo/rpc/protocol.cpp index 8d4823da8e8..fa7c9940d1a 100644 --- a/src/mongo/rpc/protocol.cpp +++ b/src/mongo/rpc/protocol.cpp @@ -216,9 +216,18 @@ Status validateWireVersion(const WireVersionInfo client, const WireVersionInfo s << server.maxWireVersion << ") is incompatible with client min wire version (" << client.minWireVersion << "," << client.maxWireVersion << ")."; if (client.maxWireVersion < server.minWireVersion) { - return Status(ErrorCodes::IncompatibleWithUpgradedServer, errmsg); + return Status(ErrorCodes::IncompatibleWithUpgradedServer, + str::stream() + << errmsg + << "You (client) are attempting to connect to a node (server) that " + "no longer accepts connections with your(client’s) binary " + "version.Please upgrade the client’s binary version."); } - return Status(ErrorCodes::IncompatibleServerVersion, errmsg); + return Status(ErrorCodes::IncompatibleServerVersion, + str::stream() << errmsg << "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."); } return Status::OK(); |