Bug 14925 - Failed to start ctdb when net.ipv4.ip_nonlocal_bind=1
Summary: Failed to start ctdb when net.ipv4.ip_nonlocal_bind=1
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Martin Schwenke
QA Contact: Samba QA Contact
Depends on:
Reported: 2021-12-06 12:54 UTC by Zhu Shangzhong
Modified: 2021-12-08 03:10 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Zhu Shangzhong 2021-12-06 12:54:12 UTC
1. Edit /etc/sysctl.conf
2. sysctl -p
3. restart ctdb, and it will fail
Comment 1 Martin Schwenke 2021-12-08 02:05:20 UTC

This is expected behaviour and is documented in the ctdb.conf(5) manual page, also available at:


node address = IPADDR

    IPADDR is the private IP address that ctdbd will bind to.

    This option is only required when automatic address detection can not be
    used. This can be the case when running multiple ctdbd daemons/nodes on the
    same physical host (usually for testing), using InfiniBand for the private
    network or on Linux when sysctl net.ipv4.ip_nonlocal_bind=1.

    Default: CTDB selects the first address from the nodes list that it can bind 
    to. See also the PRIVATE ADDRESS section in ctdb(7). 

So, you need to set "node address" in ctdb.conf on each node.

This was also last discussed on the mailing list in January 2020:


Note that the kernel documentation (e.g. https://www.kernel.org/doc/html/v5.12/networking/ip-sysctl.html) says:

  If set, allows processes to bind() to non-local IP addresses, which can be
  quite useful - but may break some applications.

In this case CTDB doesn't break but does require that you provide a fixed node address.

I'll close this as "invalid" because it is a documented issue.
Comment 2 Zhu Shangzhong 2021-12-08 03:10:04 UTC
Got it. Thanks!