Vagrant error while running replica set lab command

Hi I am getting error while erroring validate_lab_initialize_local_replica_set

Client experienced a timeout when connecting to the database - check that mongod
processes are running on ports 27001, 27002 and 27003, and that the 'm103-admin'
user authenticates against the admin database.

here is the userSetting

MongoDB Enterprise m103-example:PRIMARY> db.getUser("m103-admin")
{
	"_id" : "admin.m103-admin",
	"user" : "m103-admin",
	"db" : "admin",
	"roles" : [
		{
			"role" : "root",
			"db" : "admin"
		}
	]
}

here is the status rs.status()

		{
			"_id" : 0,
			"name" : "192.168.103.100:27001",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 356,
			"optime" : {
				"ts" : Timestamp(1543992824, 1),
				"t" : NumberLong(3)
			},
			"optimeDate" : ISODate("2018-12-05T06:53:44Z"),
			"syncingTo" : "",
			"syncSourceHost" : "",
			"syncSourceId" : -1,
			"infoMessage" : "",
			"electionTime" : Timestamp(1543992482, 1),
			"electionDate" : ISODate("2018-12-05T06:48:02Z"),
			"configVersion" : 3,
			"self" : true,
			"lastHeartbeatMessage" : ""
		},
		{
			"_id" : 1,
			"name" : "m103:27002",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 350,
			"optime" : {
				"ts" : Timestamp(1543992824, 1),
				"t" : NumberLong(3)
			},
			"optimeDurable" : {
				"ts" : Timestamp(1543992824, 1),
				"t" : NumberLong(3)
			},
			"optimeDate" : ISODate("2018-12-05T06:53:44Z"),
			"optimeDurableDate" : ISODate("2018-12-05T06:53:44Z"),
			"lastHeartbeat" : ISODate("2018-12-05T06:53:46.956Z"),
			"lastHeartbeatRecv" : ISODate("2018-12-05T06:53:47.496Z"),
			"pingMs" : NumberLong(0),
			"lastHeartbeatMessage" : "",
			"syncingTo" : "192.168.103.100:27001",
			"syncSourceHost" : "192.168.103.100:27001",
			"syncSourceId" : 0,
			"infoMessage" : "",
			"configVersion" : 3
		},
		{
			"_id" : 2,
			"name" : "m103:27003",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 342,
			"optime" : {
				"ts" : Timestamp(1543992824, 1),
				"t" : NumberLong(3)
			},
			"optimeDurable" : {
				"ts" : Timestamp(1543992824, 1),
				"t" : NumberLong(3)
			},
			"optimeDate" : ISODate("2018-12-05T06:53:44Z"),
			"optimeDurableDate" : ISODate("2018-12-05T06:53:44Z"),
			"lastHeartbeat" : ISODate("2018-12-05T06:53:46.958Z"),
			"lastHeartbeatRecv" : ISODate("2018-12-05T06:53:47.239Z"),
			"pingMs" : NumberLong(0),
			"lastHeartbeatMessage" : "",
			"syncingTo" : "192.168.103.100:27001",
			"syncSourceHost" : "192.168.103.100:27001",
			"syncSourceId" : 0,
			"infoMessage" : "",
			"configVersion" : 3
		}

What is the address of m103?

Try commenting out line 127.0.1.1 in /etc/hosts.
Can you log to mongo with m103-admin user?

Hi abuzar_hamza,

Just few things to make sure here are:

  • Use 192.168.103.100:27002 and 192.168.103.100:27003 as your address of the nodes. I don’t believe in this lab we require you to map to m103.

  • Try login through m103-admin user. Sometimes, a space character can be copied/pasted in password.

      use admin
      db.auth("m103-admin","m103-pass")
    

If it outputs 1, means you are fine. else delete this user and create again.

Kanika