It appears that when using a replica set connection string, the --ssl option is required in order to get the mongo shell to connect to the nodes using TLS. This issue reproduces with the 3.6 and 4.0 versions of the mongo shell but not the master version of the mongo shell.
[js_test:explain_shell_helpers] 2019-01-18T14:31:03.881-0500 2019-01-18T14:31:03.880-0500 I NETWORK [thread1] Marking host demo36-shard-00-01-3shst.mongodb.net:27017 as failed :: caused by :: Location11002: socket exception [CONNECT_ERROR] for demo36-shard-00-01-3shst.mongodb.net:27017 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.904-0500 2019-01-18T14:31:03.903-0500 I NETWORK [thread1] Marking host demo36-shard-00-00-3shst.mongodb.net:27017 as failed :: caused by :: Location11002: socket exception [CONNECT_ERROR] for demo36-shard-00-00-3shst.mongodb.net:27017 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.943-0500 2019-01-18T14:31:03.943-0500 I NETWORK [thread1] Marking host demo36-shard-00-00-3shst.mongodb.net:27017 as failed :: caused by :: Location11002: socket exception [CONNECT_ERROR] for demo36-shard-00-00-3shst.mongodb.net:27017 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.944-0500 2019-01-18T14:31:03.943-0500 E QUERY [thread1] Error: Could not satisfy $readPreference of '{ mode: "secondary", tags: [] }' while attempting to run command explain : [js_test:explain_shell_helpers] 2019-01-18T14:31:03.944-0500 runClientFunctionWithRetries@src/mongo/shell/session.js:329:27 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.944-0500 runCommand@src/mongo/shell/session.js:423:25 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.945-0500 DB.prototype._runCommandImpl@src/mongo/shell/db.js:145:16 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.945-0500 DB.prototype.runCommand@src/mongo/shell/db.js:161:20 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.945-0500 DB.prototype.runReadCommand@src/mongo/shell/db.js:139:16 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.945-0500 constructor/this.finish@src/mongo/shell/explain_query.js:164:21 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.946-0500 @jstests/core/explain_shell_helpers.js:168:11 [js_test:explain_shell_helpers] 2019-01-18T14:31:03.946-0500 failed to load: jstests/core/explain_shell_helpers.js
- is related to
-
SERVER-38319 DBClientRS should propagate URI options through all paths
- Closed