-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: 3.4.0
-
Component/s: Shell
-
None
-
Fully Compatible
-
ALL
-
v3.4
-
- Create a replica set
- Connect from the shell using the the --host parameter: mongo --host replSet/Host:Port
-
Platforms 2017-01-23
-
(copied to CRM)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In v3.4 the following no longer works
mongo --host replset/localhost:27018 MongoDB shell version v3.4.0 connecting to: mongodb://replset/localhost:27018 2016-12-05T21:45:22.474+0000 E QUERY [main] Error: Failed to parse mongodb:// URL: mongodb://replset/localhost:27018 : connect@src/mongo/shell/mongo.js:234:13 @(connect):1:6 exception: connect failed
Where it used to work in v3.2
usr/local/m/versions/3.2.10/bin$ ./mongo --host replset/localhost:27018
MongoDB shell version: 3.2.10
connecting to: replset/localhost:27018/test
The documentation has an example.
- is duplicated by
-
SERVER-27731 MongoDB 3.4.1 shell still unable to connect to replicaset via --host
-
- Closed
-
-
SERVER-27404 Mongo shell `--host` option for replica sets broken in 3.4
-
- Closed
-
-
SERVER-27417 Failed to parse host option if replica set name is specified
-
- Closed
-
- is related to
-
SERVER-28072 Running a script using 'mongo' on replication set fails
-
- Closed
-
- related to
-
SERVER-22382 mongo shell should accept mongodb:// URI for --host
-
- Closed
-