Bug #85620 failed to start new cluster using mysql cluster manager (mcm)
Submitted: 24 Mar 2017 16:32 Modified: 8 Jun 2017 2:09
Reporter: Shay Cohavi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster Manager Severity:S1 (Critical)
Version:7.5.5 OS:Red Hat (6.6)
Assigned to: CPU Architecture:Any
Tags: mcm 1.4.2, mcm-1.4.2-cluster-7.5.5-linux-rhel5-x86-64bit.rpm, mysql cluster 7.5.5

[24 Mar 2017 16:32] Shay Cohavi
Description:
using mcm-1.4.2-cluster-7.5.5-linux-rhel5-x86-64bit.rpm

start cluster mysql_cluster;

output:
ERROR 9002 (00MGR): Agent 0 received abort for tx {484ff8a5 135 0 47} @{54 0 51 Wait for mysqld to start (genesis)} from agent 2

in the mcmd.log:
2017-03-24 18:47:49.200: (info) [T0x7fb038002800 RECFG@reconfig.c:5079] Failed to connect to mysqld at 127.0.0.1:3306 as root: ERROR 1130 (HY000) Host '127.0.0.1' is not allowed to connect to this MySQL server
2017-03-24 18:47:49.201: (info) [T0x7fb038002800 RECFG@reconfig.c:5079] Failed to connect to mysqld at 127.0.0.1:3306 as mcmd: ERROR 1130 (HY000) Host '127.0.0.1' is not allowed to connect to this MySQL server

How to repeat:
after creating a new cluster using mcm utility, and trying to start the new cluster using:
servers:
192.168.15.217 mgmd, ndbd, mysqld
192.168.15.218 mgmd, ndbd, mysqld
192.168.15.219 mysqld

creating site:
create site --hosts=192.168.15.217 mysql_site;
adding hosts:
add hosts --hosts=192.168.15.218 mysql_site;
add hosts --hosts=192.168.15.219 mysql_site;
adding package:
add package --basedir=/opt/mcm/cluster 7.4.8;
create cluster:
create cluster --package=7.4.8 --processhosts=ndb_mgmd@192.168.15.217,ndb_mgmd@192.168.15.218,ndbd@192.168.15.217,ndbd@192.168.15.218,mysqld@192.168.15.217,mysqld@192.168.15.218,mysqld@192.168.15.219 mysql_cluster;
adding process:
add process --processhosts=ndbapi@* mysql_cluster;
setting parameters:
set skip_name_resolve:mysqld=1 mysql_cluster;
set lower_case_table_names:mysqld=1 mysql_cluster;
set NoOfFragmentLogFiles:ndbd=192 mysql_cluster;
set MaxNoOfAttributes:ndbd=10000 mysql_cluster;
set MaxNoOfOrderedIndexes:ndbd=1024 mysql_cluster;
starting cluster:
start cluster mysql_cluster;
[26 Mar 2017 19:08] MySQL Verification Team
Hi Shay,

I'm not able to reproduce this with 1.3.2mcm and 7.5.5 mccge.

Can you collect all the logs (both mcm and mccge) and upload to the issue?

thanks
Bogdan
[27 Mar 2017 7:21] Shay Cohavi
file attached....mcmd.log
[27 Mar 2017 8:06] Shay Cohavi
the problem reproduce if during the cluster creation the skip_name_resolve parameter is set to "1".
example:
create site --hosts=192.168.15.217 mysql_site;

add hosts --hosts=192.168.15.218 mysql_site;
add hosts --hosts=192.168.15.219 mysql_site;

add package --basedir=/opt/mcm/cluster 7.5.5;

create cluster --package=7.5.5 --processhosts=ndb_mgmd@192.168.15.217,ndb_mgmd@192.168.15.218,ndbd@192.168.15.217,ndbd@192.168.15.218,mysqld@192.168.15.217,mysqld@192.168.15.218,mysqld@192.168.15.219 mysql_cluster;

add process --processhosts=ndbapi@* mysql_cluster;

set skip_name_resolve:mysqld=1 mysql_cluster;
set lower_case_table_names:mysqld=1 mysql_cluster;
set NoOfFragmentLogFiles:ndbd=192 mysql_cluster;
set MaxNoOfAttributes:ndbd=10000 mysql_cluster;
set MaxNoOfOrderedIndexes:ndbd=1024 mysql_cluster;

start cluster mysql_cluster;

if I remove the "set skip_name_resolve:mysqld=1 mysql_cluster;" command, I'm able to start the cluster properly!

Please advice!
[27 Mar 2017 14:43] MySQL Verification Team
Hi,

I don't see any attached files?

I'll try to reproduce with the new parameter.

all best
Bogdan
[28 Mar 2017 15:14] Shay Cohavi
mcmd.log tar bz2

Attachment: mcmd.tar.bz2 (application/x-bzip2, text), 101.97 KiB.

[28 Mar 2017 15:14] Shay Cohavi
file added!
[4 Apr 2017 22:49] MySQL Verification Team
Hi,

weird but I verified this bug, not sure how resolving affects this but it does.

Thanks for the report.

all best
Bogdan Kecman
[8 Jun 2017 2:09] Daniel So
Posted by developer:
 
Added the following entry to the MySQL Cluster Manager 1.4.3 changelog:

"If a mysqld node was configured with the --skip-name-resolve option, attempts for mcmd to connect to the mysqld node would fail with the error message Host '127.0.0.1' is not allowed to connect to this MySQL server. This was because the MySQL account used by mcmd had 127.0.0.1 as its host name, which is not allowed when the --skip-name-resolve option is used with the mysqld node. This fix corrects the account host name to localhost.

This fix also makes sure that when a mysqld node is configured with the --skip-networking option, mcmd tries to use a named pipe or shared memory on Windows, or a socket file on Unix to connect to the mysqld node, instead of using TCP/IP."