-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Connectivity
-
None
-
Iteration Geneva
-
Not Needed
There seem to be at least two problems here:
1. mongosh requires a replica set name in order to accept multiple hosts in --host:
$ mongo --username anna2 --password [...] --host host2:27017,host1:27017,host0:27017 --tls MongoDB shell version v4.4.1 connecting to: mongodb://host2:27017,host1:27017,host0:27017/?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("fb634dc8-c03a-43f6-8271-b3b85c697817") } MongoDB server version: 4.4.6 MongoDB Enterprise mongosh-shard-0:SECONDARY> bye $ mongosh --username anna2 --password [...] --host host2:27017,host1:27017,host0:27017 --tls MongoshInvalidInputError: [COMMON-10001] The --host argument contains an invalid character: ,
2. mongosh fails to authenticate properly when a replset name is used:
$ /tmp/mongosh-1.0.0-linux-x64/bin/mongosh --username anna2 --password XYYZRALJUSNFKBbq --host mongosh-shard-0/host2:27017,host1:27017,host0:27017 --tls
Current Mongosh Log ID: 60ef01f342d74576e83ad11f
Connecting to: mongodb://host2:27017,host1:27017,host0:27017/test?replicaSet=mongosh-shard-0
MongoServerError: Authentication failed.