I'm trying to build a small cluster using mongodb sharding. I tried with everything in localhost and it works perfect. But when I try on my local network where there are two nodes, node1 and node2, it does not work. In both nodes, mongod are started to serve as shard. In node1, config server and mongos are started. All listening 0.0.0.0 with exclusively allocated ports.
I can connect and do things with both nodes. When I use mongo to login mongos in node1, I can add Node1 mongod as shard but when I try to add Node2, an error occurs:
mongos> sh.addShard("<ip of node2 in local network>")
{ "ok" : 0, "errmsg" : "No common protocol found.", "code" : 126 }
I did some searching but few documentation is about this error.
mongo addShard "No common protocol found" errmsg 126 shows the same error but it does not seem helpful.