Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1722

sysctl.net.ipv4.ip_nonlocal_bind=1 break replica sets

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.1
    • Affects Version/s: 1.6.0, 1.6.1, 1.6.2
    • Component/s: Replication
    • None
    • Environment:
      Ubuntu 10.04.01
    • ALL

      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.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            egorfine Egor Egorov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: