Unable to delpoy replica set in windows platform

Hello Everyone,

I am working to deploy a replica set in three windows platform computers in the same network so I created the computer-name for each one like the following:

1.) DESKTOP-MONGO01:27017
2.) DESKTOP-MONGO02:27017
3.) DESKTOP-MONGO03:27017

I am trying to connect the second computer by using cmd

C:\DESKTOP-MONGO01>mongo "DESKTOP-MONGO02:27017"
MongoDB shell version v5.0.6
connecting to: mongodb://DESKTOP-MONGO02:27017/test?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server DESKTOP-MONGO02:27017, connection attempt failed: NetworkTimeout: Error connecting to DESKTOP-MONGO02:27017 (10.25.35.96:27017) :: caused by :: Socket operation timed out :
connect@src/mongo/shell/mongo.js:372:17
@(connect):2:6
exception: connect failed
exiting with code 1

Network in Config file

net:
  port: 27017
  bindIp: 127.0.0.1,DESKTOP-MONGO02

All the three computers use the same mongo version but for now I am not able to connect the second or the third computer from the first one.

The issue is the mongo is able to see the computer Private IP (10.25.35.96) but cannot connect, and if it is firewall issue in the second/third computer haw to solve it in windows firewall?

Thanks for helping

May be firewall blocking your nodes
Each node should be able to connect with other
Are they in the same data centre or different?
Private IPs work in same DC

Thank you, you are right i white list port 27017 in the third and second computer and its working fine.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.