I want to build a replica set. The conf files of my 3 machines are attached. I booted the primary machine. The process started correctly. However, I cannot add the 2nd and 3rd machines, that is, the secondry machines.
The error I get when I run the rs.add(“192.168.122.203:27017”) command; “errmsg” : “Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: 192.168.122.201:27017; the following nodes did not respond affirmatively: 192.168.122.203:27017 failed with No route to Shoo”. I would be glad if you help.
@Stennie_X The error I get is not related to the conf.
the process is working properly. conf seems to be wrong while typing here.The real problem is rs.add()
Can the primary reach the secondary machines? What is the result of running ping 192.168.122.203 from the primary? No route to host sounds like a networking issue.
accessible
ping 192.168.122.202
PING 192.168.122.202 (192.168.122.202) 56(84) bytes of data.
64 bytes from 192.168.122.202: icmp_seq=1 ttl=64 time=0.457 ms
64 bytes from 192.168.122.202: icmp_seq=2 ttl=64 time=0.436 ms
64 bytes from 192.168.122.202: icmp_seq=3 ttl=64 time=0.432 ms
1-)I am using the same config file for all replica sets.
2-)3 different machines installed on securecrt on my main computer.
3-)
4-)NAME=“Red Hat Enterprise Linux Server”
VERSION=“7.9 (Maipo)”
5-)3.6.8 enterprise
Hi are these on separate VMs? the error “no route to host” suggests that the FW is not open. You can check this very easily by doing a telnet secondary_ip mongod_port from the primary and see if it can can connect. Even though the ping succeeds you need to validate on the specific mongod port.
if that fails it means there is a FW blocking it (probably the default rhel FW) so you can open it and then try again.
Is there a reason that you’re running version 3.6.8? Support for this version ended in April of 2021. If you’re setting up a production system, I would recommend going to either 5.0 or 6.0 (recently released) depending on your comfort level. Even if this is a test system, I would recommend a newer version of MongoDB so that you get all the newer features, as well as the latest security, stability and performance patches.
The problem here is related to linux. I disabled the service called iptables first. Then I repeated the process and the problem was solved. #systemctl disable iptables