0

can not figure out what i am doing wrong

I have NDB cluster test set up inside docker and my sql nodes do not connect to datanodes. management looks like this:

Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     4 node(s)
id=3    @172.17.0.12  (mysql-8.0.21 ndb-8.0.21, starting, Nodegroup: 0, *)
id=4    @172.17.0.13  (mysql-8.0.21 ndb-8.0.21, starting, Nodegroup: 0)
id=5    @172.17.0.14  (mysql-8.0.21 ndb-8.0.21, starting, Nodegroup: 0)
id=6    @172.17.0.15  (mysql-8.0.21 ndb-8.0.21, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 2 node(s)
id=1    @172.17.0.10  (mysql-8.0.21 ndb-8.0.21)
id=2    @172.17.0.11  (mysql-8.0.21 ndb-8.0.21)

[mysqld(API)]   2 node(s)
id=101 (not connected, accepting connect from 172.17.0.4)
id=102 (not connected, accepting connect from 172.17.0.17)

and config file is:

[ndb_mgmd]
#Management Node (PRIMARY)
NodeId=1
HostName=172.17.0.10

[ndb_mgmd]
#Management Node 
NodeId=2
HostName=172.17.0.11
  
[ndbd default]
NoOfReplicas=2
MaxNoOfAttributes=50000
DataMemory=10G
MaxNoOfOrderedIndexes=50000
NoOfFragmentLogFiles=429496
RedoBuffer=320M 
DataDir=/var/lib/mysql-cluster
BackupDataDir=/var/lib/mysql-cluster

[ndbd]
#Data Node ndbd10
NodeId=3
HostName=172.17.0.12
NodeGroup=1

[ndbd]
#Data Node ndbd11
NodeId=4
HostName=172.17.0.13
NodeGroup=1

[ndbd]
#Data Node ndbd12
NodeId=5
HostName=172.17.0.14
NodeGroup=2

[ndbd]
#Data Node ndbd13
NodeId=6
HostName=172.17.0.15
NodeGroup=2

[mysqld]
#SQL Node mysqld10
NodeId=101
HostName=172.17.0.4

[mysqld]
#SQL Node mysqld11
NodeId=102
HostName=172.17.0.17

and my.cnf is:

[mysqld]
ndbcluster
ndb-connectstring=172.17.0.10
ndb-connectstring=172.17.0.11
default_storage_engine=ndbcluster 
user=root
     
basedir=/opt/mysql/mysql
datadir=/opt/mysql/mysql/data
     
socket=/var/lib/mysql/mysql.sock
     
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

lc-messages-dir=/usr/share/mysql-8.0/english/
lc-messages=en_US

[ndb_mgmd]
configdir=/var/mysql
bind-address=192.168.0.8
     
[mysql_cluster]
ndb-connectstring=172.17.0.10
ndb-connectstring=172.17.0.11

also tried ndb-connectstring="172.17.0.10,172.17.0.11" and also with ports

if I try to netcat it from sqlnode:

[root@78a48a8971ac data]# nc -v -z 172.17.0.11 1186
Connection to 172.17.0.11 1186 port [tcp/mysql-cluster] succeeded!
[root@78a48a8971ac data]# nc -v -z 172.17.0.10 1186
Connection to 172.17.0.10 1186 port [tcp/mysql-cluster] succeeded!

and vice versa from one of the management node

[root@2a8cf500e5e8 /]# nc -v -z 172.17.0.4 3306
Connection to 172.17.0.4 3306 port [tcp/mysql] succeeded!

sql node log looks like this:

2021-10-04T14:29:42.696963Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21-cluster) starting as process 936
2021-10-04T14:29:42.697045Z 0 [Warning] [MY-010339] [Server] Using pre 5.5 semantics to load error messages from /usr/share/mysql-8.0/english/. If this is not intend
ed, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
2021-10-04T14:29:42.708320Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-10-04T14:29:43.943246Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-10-04T14:31:46.194523Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-10-04T14:31:46.269558Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2021-10-04T14:31:46.298439Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2021-10-04T14:31:46.412035Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-10-04T14:31:46.412442Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-10-04T14:31:46.467170Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21-cluster'  socket: '/var/lib/mysql/mysql.sock'
port: 3306  MySQL Cluster Community Server - GPL.
2021-10-04T14:32:16.469588Z 0 [ERROR] [MY-010865] [Server] NDB: Tables not available after 30 seconds. Consider increasing --ndb-wait-setup value

please help, it is emergency

5
  • Are all the NDB nodes in dockers on a single machine? How much RAM on that machine? Are the port numbers properly mapped across the docker boundary? Is the data being stored in separate "volumes" or is it kept in each docker?
    – Rick James
    Oct 4 at 16:52
  • It seems strange to use Docker for NDB unless there are several servers -- one per data node, and then use dockers just for the "maintenance" nodes.
    – Rick James
    Oct 4 at 16:53
  • yes all are in same machine, its the test that wont be in the same machine if it goes live, all nodes are going to be in differend hardware and in different geographic locations. its a proof of consept thats needs to be done quick, I just cant figure out whats wrong with sql node
    – Rait
    Oct 4 at 19:03
  • Would you care to explain why you are using NDB? Only a few applications really benefit from NDB instead of InnoDB.
    – Rick James
    Oct 4 at 21:44
  • to other foolish people like me, it seems like me, double check your cluster configuration file, is there anything out of range that cluster is capable of.
    – Rait
    Oct 7 at 6:39
0

Both the IP addresses and the Port numbers for all MySQLs should be checked. Either or both (IP & port) should be changed when going live.

Also, make sure that the total ram needed by the dockers adds up to less than the RAM on your test machine.

1
  • all those meet requirements. IPs and ports are correct and this test machine has a lot of memory, only 20% is used. And if the next question is firewall, none of the containers have it and they can talk to each other.
    – Rait
    Oct 5 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.