I have some problems with the lab "Deploy a replica set"

Can someone help me?

Thank you

I have received this error

m103-repl:PRIMARY> rs.add("m103-repl:27003")
{
        "operationTime" : Timestamp(1648833882, 1),
        "ok" : 0,
        "errmsg" : "Either all host names in a replica set configuration must be localhost references, or none must be; found 1 out of 2",
        "code" : 103,
        "codeName" : "NewReplicaSetConfigurationIncompatible",
        "$clusterTime" : {
                "clusterTime" : Timestamp(1648833882, 1),
                "signature" : {
                        "hash" : BinData(0,"087nOcossxwQrLzry26KbxQpkJw="),
                        "keyId" : NumberLong("7081686998431301633")
                }
        }
}

is not the name of the host. It is the name of the replica set. For M103 course, the host is either localhost or 127.0.0.1. Run rs.status() to see if the other hosts in the replica set are using localhost or 127.0.0.1.

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.