mysqlubuntu-20.04mysql-cluster

MYSQL CLUSTER shows mgmd init error in ubuntu 20


My Linux Server is ubuntu 20 MySQL Cluster Management Server mysql-8.0.23 ndb-8.0.23 MySQL distrib mysql-8.0.23 ndb-8.0.23, for Linux (x86_64)

When I try to start(command:ndb_mgmd -f config.ini --ndb-nodeid=11) the mysql cluster mgmd node, it always show the error message Could anyone help me? Thanks

===error message==
2021-04-30 18:02:26 [MgmtSrvr] ERROR    -- The hostname this node should have according to the configuration does not match a local interface. Attempt to bind '172.22.131.159' failed with error: 9 'Bad file descriptor'
==network interface information==
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:9b:c7:65 brd ff:ff:ff:ff:ff:ff
    inet 172.22.131.159/24 brd 172.22.131.255 scope global ens160
       valid_lft forever preferred_lft forever***
==config.ini==

[ndbd default]

NoOfReplicas=2

DataMemory=512M

[ndb_mgmd]

HostName=172.22.131.159
NodeID=11
DataDir=/data/mysql/mysql-cluster

[ndbd]

HostName=172.22.131.159
NodeId=21
DataDir=/data/mysql/data

[ndbd]

HostName=172.22.131.160
NodeId=22
DataDir=/data/mysql/data

[mysqld]

HostName=172.22.131.159
NodeID=31

Solution

  • Since MySQL Cluster 8.0.22, when support for IPv6 was introduced, MySQL Cluster unintentionally requires kernel support for IPv6 (which I suspect you have disabled).

    Sorry for that answer, please file a bug for your issue.

    Meanwhile you can consider some workaround.

    1. Keep IPv6 support in kernel and instead disable it after boot.

      • Remove ipv6.disable=1 from kernel boot parameters.

      • Instead disable IPv6 using:

        sysctl -w net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1
        

        Or add corresponding to /etc/sysctl.conf

    2. Use MySQL Cluster 8.0.21 which do not support IPv6.