I am trying to start one management node, one sql node an d one data node on the same server. Even when I tried to start sql node on different server. it does not connect to the cluster.
Here is the configuration for management Node:
[ndb_mgmd default]
# Directory for MGM node log files
DataDir=/var/lib/mysql-cluster
[ndb_mgmd]
#Management Node db1
HostName=10.0.2.55
[ndbd default]
NoOfReplicas=1 # Number of replicas
DataMemory=256M # Memory allocate for data storage
IndexMemory=128M # Memory allocate for index storage
#Directory for Data Node
DataDir=/var/lib/mysql-cluster
[ndbd]
#Data Node db2
HostName=10.0.2.55
[mysqld]
#SQL Node db3
HostName=10.0.2.55
Here configuration for SQL Node:
[mysqld]
ndbcluster
ndb-connectstring=10.0.2.55 # IP address for server management node
default_storage_engine=ndbcluster # Define default Storage Engine used by MySQL
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql_cluster]
ndb-connectstring=10.0.2.55
Mysql log file.
systemctl start mysqld
2017-09-14T10:03:19.741042Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-09-14T10:03:19.920537Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.19-ndb-7.5.7-cluster-commercial-advanced) starting as process 7910 ...
2017-09-14T10:03:20.026959Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-09-14T10:03:20.027035Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-14T10:03:20.027050Z 0 [Note] InnoDB: Uses event mutexes
2017-09-14T10:03:20.027059Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-09-14T10:03:20.027066Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-14T10:03:20.027078Z 0 [Note] InnoDB: Using Linux native AIO
2017-09-14T10:03:20.031330Z 0 [Note] InnoDB: Number of pools: 1
2017-09-14T10:03:20.031449Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-09-14T10:03:20.038559Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-09-14T10:03:20.049613Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-09-14T10:03:20.058066Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-09-14T10:03:20.100593Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-09-14T10:03:20.240858Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-09-14T10:03:20.241064Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-09-14T10:03:20.304304Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-09-14T10:03:20.326178Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-09-14T10:03:20.326221Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-09-14T10:03:20.329446Z 0 [Note] InnoDB: Waiting for purge to start
2017-09-14T10:03:20.380489Z 0 [Note] InnoDB: 5.7.19 started; log sequence number 2540845
2017-09-14T10:03:20.381499Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-09-14T10:03:20.428003Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-09-14T10:03:20.461701Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170914 15:33:20
2017-09-14T10:03:20.722901Z 0 [Note] NDB: NodeID is 3, management server '10.0.2.55:1186'
2017-09-14T10:03:50.763251Z 0 [Note] NDB[0]: NodeID: 3, no storage nodes connected (timed out)
2017-09-14T10:03:50.780418Z 0 [Warning] NDB: server id set to zero - changes logged to bin log with server id zero will be logged with another server id by slave mysqlds
2017-09-14T10:03:50.802467Z 0 [Note] NDB Binlog: Starting...
2017-09-14T10:03:50.802517Z 0 [Note] NDB Util: Starting...
2017-09-14T10:03:50.802718Z 0 [Note] NDB Index Stat: Starting...
2017-09-14T10:03:50.802739Z 0 [Note] NDB Index Stat: Wait for server start completed
2017-09-14T10:03:50.835952Z 1 [Note] NDB Util: Wait for server start completed
2017-09-14T10:03:50.836165Z 2 [Note] NDB Binlog: Started
2017-09-14T10:03:50.836179Z 2 [Note] NDB Binlog: Setting up
2017-09-14T10:03:50.836281Z 2 [Note] NDB Binlog: Created schema Ndb object, reference: 0x80040003, name: 'Ndb Binlog schema change monitoring'
2017-09-14T10:03:50.836309Z 2 [Note] NDB Binlog: Created injector Ndb object, reference: 0x80050003, name: 'Ndb Binlog data change monitoring'
2017-09-14T10:03:50.836315Z 2 [Note] NDB Binlog: Setup completed
2017-09-14T10:03:50.836318Z 2 [Note] NDB Binlog: Wait for server start completed
2017-09-14T10:03:50.916216Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2017-09-14T10:03:50.916251Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2017-09-14T10:03:50.918306Z 0 [Warning] CA certificate ca.pem is self signed.
2017-09-14T10:03:50.918380Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2017-09-14T10:03:50.922231Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2017-09-14T10:03:50.922282Z 0 [Note] IPv6 is available.
2017-09-14T10:03:50.922302Z 0 [Note] - '::' resolves to '::';
2017-09-14T10:03:50.922340Z 0 [Note] Server socket created on IP: '::'.
2017-09-14T10:03:52.165910Z 0 [Note] Event Scheduler: Loaded 0 events
2017-09-14T10:03:52.166347Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.19-ndb-7.5.7-cluster-commercial-advanced' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Cluster Server - Advanced Edition (Commercial)
2017-09-14T10:03:52.166391Z 0 [Note] NDB Index Stat: Wait for cluster to start
2017-09-14T10:03:52.166436Z 0 [Note] NDB Index Stat: Started
2017-09-14T10:03:52.166470Z 1 [Note] NDB Util: Wait for cluster to start
2017-09-14T10:03:52.166536Z 1 [Note] NDB Util: Started
2017-09-14T10:03:52.166659Z 2 [Note] NDB Binlog: Check for incidents
2017-09-14T10:03:52.166669Z 2 [Note] NDB Binlog: Wait for cluster to start
2017-09-14T10:03:52.166927Z 0 [Note] NDB Index Stat: created Ndb object 'Ndb Index Stat', ref: 0x80070003
2017-09-14T10:04:22.169180Z 0 [Warning] NDB : Tables not available after 30 seconds. Consider increasing --ndb-wait-setup value
2017-09-14T10:04:22.169214Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
2017-09-14T10:04:22.169219Z 0 [Note] Beginning of list of non-natively partitioned tables
2017-09-14T10:04:22.177930Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-09-14T10:04:22.177973Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-09-14T10:04:22.178662Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-09-14T10:04:22.191266Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-09-14T10:04:22.191388Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-09-14T10:04:22.193201Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-09-14T10:04:22.247441Z 0 [Note] End of list of non-natively partitioned tables
Management Node:
ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 10.0.2.55:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 1 node(s)
id=2 @10.0.2.55 (mysql-5.7.19 ndb-7.5.7, Nodegroup: 0, *)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.0.2.55 (mysql-5.7.19 ndb-7.5.7)
[mysqld(API)] 1 node(s)
id=3 (not connected, accepting connect from 10.0.2.55)
ndb_mgm>
what does this error mean Failed to acquire global schema lock, error: (4009)Cluster Failure. mysqld is started but it is not connected to the management node. I am using CentOS 7.
User contributions licensed under CC BY-SA 3.0