[SERVER-39093] Cannot use TLS with readPreference={mode: "secondary"} without specifying --ssl to mongo shell Created: 18/Jan/19  Updated: 29/Oct/23  Resolved: 07/Mar/19

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 3.6.10, 4.0.5
Fix Version/s: 4.0.7

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Mathias Stearn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-38319 DBClientRS should propagate URI optio... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2019-01-28, Service Arch 2019-02-11, Service Arch 2019-02-25, Service Arch 2019-03-11
Participants:

 Description   

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


Generated at Thu Feb 08 04:51:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.