Help Center/ Document Database Service/ Troubleshooting/ Connection Failure Message: cannot list multiple servers in URL without 'replicaSet' option
Updated on 2022-12-07 GMT+08:00

Connection Failure Message: cannot list multiple servers in URL without 'replicaSet' option

Symptom

An error is reported when you run the following command to connect to a DDS replica set instance:

./mongo mongodb://rwuser:xxxxxxxxxxx@192.168.168.116:8635,192.168.200.147:8635/test?authSource=admin&replicaSet=replica

Error message:

FailedToParse: Cannot list multiple servers in URL without 'replicaSet' option
try 'mongo --help' for more information.

Possible Cause

  • The versions of the client and server are inconsistent.
  • The command format is incorrect.

Fault Locating

  • Check whether the versions of the client and server are the same.
  • Check whether the format of the entered command is correct.

Solution

  • The versions of the client and server are inconsistent.
  • replicaSet is specified in the URL command. (The name of replicaSet in DDS is fixed at replica.)
  • The URL command is enclosed in double quotation marks.