Failed with HostUnreachable

I am getting the following error. How can I get ride of it?
I have 3 replica . All are run by the following command
mongod -f /var/mongodb/conf/node1.conf --fork
mongod -f /var/mongodb/conf/node2.conf --fork
mongod -f /var/mongodb/conf/node3.conf --fork

vagrant@database:~$ mongo --host "m103-example/127.0.0.1:27018" -u "root" -p "admin" --authenticationDatabase "admin"

MongoDB Enterprise m103-example:PRIMARY> rs.add("vagrant:27017")

{
	"ok" : 0,
	"errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: database:27018; the following nodes did not respond affirmatively: vagrant:27017 failed with HostUnreachable",
	"code" : 74
}

Hi @Md_Mahadia_86036,

Please confirm on the below two points:

  • you have initiated the replica set using rs.initiate()

  • the host name passed in rs.add() is correct

If both the above are already in place, please refer to the following thread and see if it can be of any help to you.

Please let me know if the issue persists.

Thanks,
Muskan
Curriculum Support Engineer

1 Like

thanks
rs.add("192.168.31.100:27019")

works

1 Like