How to I find out the host name, I'm trying to add repl set

m103-repl:PRIMARY> rs.add(localhost:27002)
2022-10-11T11:05:56.824+0000 E QUERY    [js] SyntaxError: missing ) after argument list @(shell):1:16
m103-repl:PRIMARY> rs.add("m103.mongodb.university:27001")
{
        "operationTime" : Timestamp(1665486817, 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(1665486817, 1),
                "signature" : {
                        "hash" : BinData(0,"um+QkK8n7QKZtbGwXjjx5PipPwo="),
                        "keyId" : NumberLong("7153197409340751873")
                }
        }
}

Hi :wave: @Rhujisie_Kajiri,

Welcome to the MongoDB Community forums :sparkles:

It will be localhost:27001 instead of m103.mongodb.university:27001

If you notice we have mentioned it in the lecture notes of Setting Up a Replica Set video about our change in the old hostname.

I hope it helps!

Thanks,
Kushagra