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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.7.1
    • 1.6.0, 1.6.1, 1.6.2
    • Replication
    • None
    • Ubuntu 10.04.01
    • ALL

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: