summaryrefslogtreecommitdiff
path: root/src/mongo/rpc
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2018-02-22 00:39:28 -0500
committerXiangyu Yao <xiangyu.yao@mongodb.com>2018-02-27 22:31:05 -0500
commitcc4cb29486a87598d7b490c53712d06085e5cf91 (patch)
tree1b81a7306381ad3bcad898a4c91ad12215bbc492 /src/mongo/rpc
parentce91d96dc6fe04db3327653c145a54b3768a88ac (diff)
downloadmongo-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.cpp13
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();