Here is an example command an error in the 3.1.9 shell when it is configured to use find command:
mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).batchSize(10);
assert: command failed: {
"ok" : 0,
"errmsg" : "Retried 10 times without establishing shard version on a reachable host.",
"code" : 63
} : undefined
_getErrorWithCode@src/mongo/shell/utils.js:23:13
doassert@src/mongo/shell/assert.js:13:14
assert.commandWorked@src/mongo/shell/assert.js:259:5
DBCommandCursor@src/mongo/shell/query.js:657:5
DBQuery.prototype._exec@src/mongo/shell/query.js:103:28
DBQuery.prototype.hasNext@src/mongo/shell/query.js:257:5
DBQuery.prototype.shellPrint@src/mongo/shell/query.js:500:17
shellPrintHelper@src/mongo/shell/utils.js:444:1
@(shell2):1:1
Error: command failed: {
"ok" : 0,
"errmsg" : "Retried 10 times without establishing shard version on a reachable host.",
"code" : 63
} : undefined
And here is what you get with the 3.0.6 shell or the 3.1.9 shell with wire protocol find:
mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).batchSize(10);
Error: error: {
"$err" : "Retried 10 times without establishing shard version on a reachable host.",
"code" : 63
}