Search code examples
mysqlwindowsmysql-cluster

Remote data node starting issue in MySQL Cluster


I'm playing with MySql Cluster and faced a problem with not common configuration. The most of tutorials describes configuration where data node and MySQL Server node residing on the same PC. But I'm trying to put management node and MySQL server node to PC 'A' and data node to PC 'B'. Unfortunately when I'm trying to run data node ndbd.exe shutting down immediately and leaves the following message in Windows Event Viewer: "Failed to allocate nodeid, error: 'Error: Could not alloc node id at pcA.ip.address port 1186: Connection done from wrong host ip pcB.ip.address'.".

My configuration files are following:

PC 'A' config.ini:

[ndbd default]
noofreplicas=2

[ndbd]
hostname=pcB.ip.address
nodeid=2

[ndb_mgmd]
nodeid = 1
hostname=pcA.ip.address

[mysqld]
nodeid=4
hostname=pcA.ip.address

my.cnf used by mysqld on PC 'A':

[mysqld]
ndb-nodeid=4
ndbcluster
datadir="D:\ProgramData\MySQL\MySQL Cluster 7.3\data4"
port=3306
server-id=3306

my.cnf on PC 'B':

[ndbd]
connect-string="pcA.ip.address"

Can someone say what is wrong with these files above? As I said I couldn't find tutorirals for such cluster configuration.

Thanks in advance.


Solution

  • In your setup, you're declaring to replicas, but you have only one:

    [ndbd default]
    noofreplicas=2
    

    Node configuration looks fine, but you could try using a empty ndbd definition, then reloading ndb_mgmd daemon to ensure it's applied

    [ndbd]