Error while validating Lab: Remove and Re-Add a Node [Solved]

Hi,
I am having trouble validating Lab
I was able to remove the node as below

MongoDB Enterprise m103-repl:PRIMARY> rs.remove("192.168.103.100:27001")
{
	"ok" : 1,
	"operationTime" : Timestamp(1553350386, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1553350386, 1),
		"signature" : {
			"hash" : BinData(0,"c2IVCX2xVoDs+6x/0Ope4O1V3m4="),
			"keyId" : NumberLong("6671275003255717890")
		}
	}
}

Then added the node using hostname, but made mistake in port as 27003.

MongoDB Enterprise m103-repl:PRIMARY> rs.add("m103:27003")
{
	"ok" : 1,
	"operationTime" : Timestamp(1553350439, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1553350439, 1),
		"signature" : {
			"hash" : BinData(0,"gVExL/5verL960hqpIkrEDrvnkA="),
			"keyId" : NumberLong("6671275003255717890")
		}
	}
}

And then errors are displayed as

When I try to validate it I am getting the following
image

Please suggest how can I proceed.
Regards,
Pinaki

Do rs.remove with the node you wrongly added and and the correct one.

Hi Steevej-1495,
Thank you for the response, but I am not able to connect to the mongo shell to do rs.remove. Any suggestions how do I do it from outside

If you have to other data than the labs data, you can remove all the files from the data directory and start over. DO NOT DO THAT in production.

You mean clear the dbPath folder for the database

I was able to resolve it. Thanks Steeve for helping out

1 Like