[SERVER-1722] sysctl.net.ipv4.ip_nonlocal_bind=1 break replica sets Created: 02/Sep/10  Updated: 12/Jul/16  Resolved: 27/Sep/10

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.6.0, 1.6.1, 1.6.2
Fix Version/s: 1.7.1

Type: Bug Priority: Major - P3
Reporter: Egor Egorov Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 10.04.01


Issue Links:
Related
is related to SERVER-1515 Find better way to implement HostAndP... Closed
Operating System: ALL
Participants:

 Description   

net.ipv4.ip_nonlocal_bind=1 is set to use linux-ha/heartbeat. Programs must be able to bind to any ip, even non-existing ones.

However, if that sysctl is in effect, then it breaks replica sets and possible other features.

See util/message.cpp, around line 720:
bool ret = (::bind(sock, addr.raw(), addr.addressSize) == 0);

It is always true in case this sysctl is in effect. So you cannot rs.add(), or rs.initiate() any server.

Another side effect is that it took about four hours to debug, including source downloading and debugging and the error report "bad config - dups?" is absolutely not explanatory.



 Comments   
Comment by Mathias Stearn [ 27/Sep/10 ]

See SERVER-1515 for fixes

Comment by Mathias Stearn [ 14/Sep/10 ]

Please try today's nightly

Comment by Mathias Stearn [ 07/Sep/10 ]

Nevermind, had to revert that change

Comment by Mathias Stearn [ 07/Sep/10 ]

This should be fixed in master. Reopen if you you still have issues.

Comment by Egor Egorov [ 03/Sep/10 ]

Maybe make a short note in the documentation until it's fixed to save other poor souls like me?

Generated at Thu Feb 08 02:57:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.