Setup:
CentOS7 / Mgmt: .140, SQL1: .141, SQL2: .142, Data1: .143, Data2: .144
IPv6 Disabled / SELINUX=disabled / Firewall 3306 & 1186 open on all.
Cluster ver: 5.7.10
Mgmt:
ndb_mgm> SHOW
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @10.5.1.143 (mysql-5.7.22 ndb-7.5.10, starting, Nodegroup: 0)
id=3 @10.5.1.144 (mysql-5.7.22 ndb-7.5.10, starting, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.5.1.140 (mysql-5.7.22 ndb-7.5.10)
[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from 10.5.1.141)
id=5 (not connected, accepting connect from 10.5.1.142)
SQL1:
To start DB:
# systemctl start mysqld
# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-05-07 11:04:35 EDT; 3min 10s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 860 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 837 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 872 (mysqld)
CGroup: /system.slice/mysqld.service
└─872 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
/etc/my.cnf (I have tried all kinds of configs for this and nothing works.)
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
ndb-nodeid=4
ndbcluster # run NDB storage engine
ndb-connectstring="10.5.1.140:1186" # location of management server
server-id=4
SQL Log:
2018-05-07T15:11:42.719184Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-05-07T15:11:42.720362Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22-ndb-7.5.10-cluster-gpl) starting as process 999 ...
2018-05-07T15:11:42.722926Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-05-07T15:11:42.722950Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-05-07T15:11:42.722955Z 0 [Note] InnoDB: Uses event mutexes
2018-05-07T15:11:42.722959Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-05-07T15:11:42.722962Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-05-07T15:11:42.722966Z 0 [Note] InnoDB: Using Linux native AIO
2018-05-07T15:11:42.723268Z 0 [Note] InnoDB: Number of pools: 1
2018-05-07T15:11:42.723351Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-05-07T15:11:42.724708Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-05-07T15:11:42.730846Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-05-07T15:11:42.732617Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-05-07T15:11:42.744127Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-05-07T15:11:42.751516Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-05-07T15:11:42.751589Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-05-07T15:11:42.762553Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-05-07T15:11:42.763412Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-05-07T15:11:42.763428Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-05-07T15:11:42.763745Z 0 [Note] InnoDB: Waiting for purge to start
2018-05-07T15:11:42.814015Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 2594153
2018-05-07T15:11:42.814424Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-05-07T15:11:42.818011Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-05-07T15:11:42.818899Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180507 11:11:42
2018-05-07T15:12:17.673217Z 0 [Note] NDB Binlog: Starting...
2018-05-07T15:12:17.673285Z 1 [Note] NDB Binlog: Started
2018-05-07T15:12:17.673290Z 1 [Note] NDB Binlog: Setting up
2018-05-07T15:12:17.673328Z 1 [Note] NDB Binlog: Created schema Ndb object, reference: 0x0, name: 'Ndb Binlog schema change monitoring'
2018-05-07T15:12:17.673341Z 1 [Note] NDB Binlog: Created injector Ndb object, reference: 0x0, name: 'Ndb Binlog data change monitoring'
2018-05-07T15:12:17.673346Z 1 [Note] NDB Binlog: Setup completed
2018-05-07T15:12:17.673350Z 1 [Note] NDB Binlog: Wait for server start completed
2018-05-07T15:12:17.673380Z 0 [Note] NDB Util: Starting...
2018-05-07T15:12:17.673411Z 2 [Note] NDB Util: Wait for server start completed
2018-05-07T15:12:17.673435Z 0 [Note] NDB Index Stat: Starting...
2018-05-07T15:12:17.673440Z 0 [Note] NDB Index Stat: Wait for server start completed
2018-05-07T15:12:17.732237Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2018-05-07T15:12:17.732490Z 0 [Warning] CA certificate ca.pem is self signed.
2018-05-07T15:12:17.733740Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2018-05-07T15:12:17.734689Z 0 [Note] IPv6 is not available.
2018-05-07T15:12:17.734711Z 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2018-05-07T15:12:17.734735Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2018-05-07T15:12:17.747536Z 0 [Note] Event Scheduler: Loaded 0 events
2018-05-07T15:12:17.747707Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.22-ndb-7.5.10-cluster-gpl' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Cluster Community Server (GPL)
2018-05-07T15:12:17.747732Z 1 [Note] NDB Binlog: Check for incidents
2018-05-07T15:12:17.747735Z 1 [Note] NDB Binlog: Wait for cluster to start
2018-05-07T15:12:17.747754Z 2 [Note] NDB Util: Wait for cluster to start
2018-05-07T15:12:17.747761Z 0 [Note] NDB Index Stat: Wait for cluster to start
2018-05-07T15:12:47.752173Z 0 [Warning] NDB : Tables not available after 30 seconds. Consider increasing --ndb-wait-setup value
CentOS7 / Mgmt: .140, SQL1: .141, SQL2: .142, Data1: .143, Data2: .144
IPv6 Disabled / SELINUX=disabled / Firewall 3306 & 1186 open on all.
Cluster ver: 5.7.10
Mgmt:
ndb_mgm> SHOW
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @10.5.1.143 (mysql-5.7.22 ndb-7.5.10, starting, Nodegroup: 0)
id=3 @10.5.1.144 (mysql-5.7.22 ndb-7.5.10, starting, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.5.1.140 (mysql-5.7.22 ndb-7.5.10)
[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from 10.5.1.141)
id=5 (not connected, accepting connect from 10.5.1.142)
SQL1:
To start DB:
# systemctl start mysqld
# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-05-07 11:04:35 EDT; 3min 10s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 860 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 837 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 872 (mysqld)
CGroup: /system.slice/mysqld.service
└─872 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
/etc/my.cnf (I have tried all kinds of configs for this and nothing works.)
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
ndb-nodeid=4
ndbcluster # run NDB storage engine
ndb-connectstring="10.5.1.140:1186" # location of management server
server-id=4
SQL Log:
2018-05-07T15:11:42.719184Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-05-07T15:11:42.720362Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22-ndb-7.5.10-cluster-gpl) starting as process 999 ...
2018-05-07T15:11:42.722926Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-05-07T15:11:42.722950Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-05-07T15:11:42.722955Z 0 [Note] InnoDB: Uses event mutexes
2018-05-07T15:11:42.722959Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-05-07T15:11:42.722962Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-05-07T15:11:42.722966Z 0 [Note] InnoDB: Using Linux native AIO
2018-05-07T15:11:42.723268Z 0 [Note] InnoDB: Number of pools: 1
2018-05-07T15:11:42.723351Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-05-07T15:11:42.724708Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-05-07T15:11:42.730846Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-05-07T15:11:42.732617Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-05-07T15:11:42.744127Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-05-07T15:11:42.751516Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-05-07T15:11:42.751589Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-05-07T15:11:42.762553Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-05-07T15:11:42.763412Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-05-07T15:11:42.763428Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-05-07T15:11:42.763745Z 0 [Note] InnoDB: Waiting for purge to start
2018-05-07T15:11:42.814015Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 2594153
2018-05-07T15:11:42.814424Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-05-07T15:11:42.818011Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-05-07T15:11:42.818899Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180507 11:11:42
2018-05-07T15:12:17.673217Z 0 [Note] NDB Binlog: Starting...
2018-05-07T15:12:17.673285Z 1 [Note] NDB Binlog: Started
2018-05-07T15:12:17.673290Z 1 [Note] NDB Binlog: Setting up
2018-05-07T15:12:17.673328Z 1 [Note] NDB Binlog: Created schema Ndb object, reference: 0x0, name: 'Ndb Binlog schema change monitoring'
2018-05-07T15:12:17.673341Z 1 [Note] NDB Binlog: Created injector Ndb object, reference: 0x0, name: 'Ndb Binlog data change monitoring'
2018-05-07T15:12:17.673346Z 1 [Note] NDB Binlog: Setup completed
2018-05-07T15:12:17.673350Z 1 [Note] NDB Binlog: Wait for server start completed
2018-05-07T15:12:17.673380Z 0 [Note] NDB Util: Starting...
2018-05-07T15:12:17.673411Z 2 [Note] NDB Util: Wait for server start completed
2018-05-07T15:12:17.673435Z 0 [Note] NDB Index Stat: Starting...
2018-05-07T15:12:17.673440Z 0 [Note] NDB Index Stat: Wait for server start completed
2018-05-07T15:12:17.732237Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2018-05-07T15:12:17.732490Z 0 [Warning] CA certificate ca.pem is self signed.
2018-05-07T15:12:17.733740Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2018-05-07T15:12:17.734689Z 0 [Note] IPv6 is not available.
2018-05-07T15:12:17.734711Z 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2018-05-07T15:12:17.734735Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2018-05-07T15:12:17.747536Z 0 [Note] Event Scheduler: Loaded 0 events
2018-05-07T15:12:17.747707Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.22-ndb-7.5.10-cluster-gpl' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Cluster Community Server (GPL)
2018-05-07T15:12:17.747732Z 1 [Note] NDB Binlog: Check for incidents
2018-05-07T15:12:17.747735Z 1 [Note] NDB Binlog: Wait for cluster to start
2018-05-07T15:12:17.747754Z 2 [Note] NDB Util: Wait for cluster to start
2018-05-07T15:12:17.747761Z 0 [Note] NDB Index Stat: Wait for cluster to start
2018-05-07T15:12:47.752173Z 0 [Warning] NDB : Tables not available after 30 seconds. Consider increasing --ndb-wait-setup value