[SERVER-40314] Cannot connect to replica set Created: 22/Mar/19 Updated: 01/Apr/19 Resolved: 01/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 4.0.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrey Kostin | Assignee: | Eric Sedor |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Not sure |
||||||||
| Participants: | |||||||||
| Description |
|
I'm trying to add new member to replica set and that new member receive connections from all other nodes but it can't connect to them. That's what I see in logs on all other nodes (xxx.xxx.xxx.xxx is the IP of new member):
|
| Comments |
| Comment by Andrey Kostin [ 01/Apr/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ok, thank you, I'll ask my grandchildren to check that 8-years old feature request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 01/Apr/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for your patience. It looks like this fits under | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrey Kostin [ 26/Mar/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
And this is the excerpt from iptables config file I use for port forwarding. Maybe you'll find it useful
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrey Kostin [ 26/Mar/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The first 3 nodes are not behind NAT and they're really configured to use their ports, but the new 4th node is behind NAT and is listening on port 27017 inside container with port forwarding configured on it's host. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 26/Mar/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for your report; we are investigating. In case it helps, can you please provide your replica set config? Omitting IPs is okay. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrey Kostin [ 23/Mar/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So, If I want to use mongod over NAT and make it accessible through port 28017, then I have to set port 28017 in mongod.conf. Simple port forwarding is not enough, these ports must be equal. Why is that? I want to bind mongod instances to port 27017 in all containers and make these instances accessible through different ports over internet. |