MySQL Forums
Forum List  »  NDB clusters

Connection done from wrong host ip
Posted by: arun chakrapani rao
Date: May 25, 2014 02:36AM

Hi,
I am new to mysql to mysql cluster.
I have installed 2 mgmt nodes/2 db nodes/1 mysql server node on ubuntu 12.04 64 bit server.
Based on the docs available on the net, I have gone ahead and installed the softwares.
it seems to me that the mgmt/ndb are running. I am trying to bring up the mysql server, it is fails by coughing up the message as

2014-05-25 12:40:53 [ndbd] INFO -- Angel connected to '172.16.3.225:1186'
2014-05-25 12:40:53 [ndbd] ERROR -- Failed to allocate nodeid, error: 'Error: Could not alloc node id at 172.16.3.225 port 1186: Connection done from wrong host ip 172.16.3.229.'


ndb_mgm> showup
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=3 @172.16.3.227 (mysql-5.6.17 ndb-7.3.5, Nodegroup: 0, *)
id=4 @172.16.3.228 (mysql-5.6.17 ndb-7.3.5, Nodegroup: 0)

[ndb_mgmd(MGM)] 2 node(s)
id=1 @172.16.3.225 (mysql-5.6.17 ndb-7.3.5)
id=2 @172.16.3.226 (mysql-5.6.17 ndb-7.3.5)

[mysqld(API)] 2 node(s)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)


my config file in the mgmt hosts is as follows

[NDBD DEFAULT]

NoOfReplicas=2
DataMemory=80M
IndexMemory=18M
[MYSQLD DEFAULT]

[NDB_MGMD DEFAULT]
DataDir=/var/lib/mysql-cluster
[TCP DEFAULT]

# Section for the cluster management node
[NDB_MGMD]
NodeId=1
# IP address of the first management node (this system)
HostName=172.16.3.225

[NDB_MGMD]
NodeId=2
#IP address of the second management node
HostName=172.16.3.226

# Section for the storage nodes
[NDBD]
# IP address of the first storage node
NodeId=3
HostName=172.16.3.227
DataDir= /var/lib/mysql-cluster
[NDBD]
# IP address of the second storage node
NodeId=4
HostName=172.16.3.228
DataDir=/var/lib/mysql-cluster
# one [MYSQLD] per storage node
[MYSQLD]
HostName=172.16.3.229
NodeId=5
[MYSQLD]
#HostName=172.16.3.330
NodeId=6
MYSQLD]


Not sure if the following parameter is right in db node, but down below is the format



root@gngrmysqlndb1:/etc/mysql# cat /etc/my.cnf
[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=172.16.3.225,172.16.3.226
[mysql_cluster]
# IP address of the cluster management node
ndb-connectstring=172.16.3.225,172.16.3.226
root@gngrmysqlndb1:/etc/mysql#


The mysql server nodes my.cnf file is is as follows
root@gngrmysqlnd1:/usr/local/mysql/bin# cat /etc/mysql/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]
ndbcluster
datadir=/usr/local/mysql/data
basedir=/usr/local/mysql
server-id=5
ndb-nodeid=5
port=3306
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
# IP address of the cluster management node
ndb-connectstring=172.16.3.225,172.16.3.226
[mysql_cluster]
# IP address of the cluster management node
ndb-connectstring=172.16.3.225,172.16.3.226



# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
root@gngrmysqlnd1:/usr/local/mysql/bin#


when i try to start the mysql server. it throws the following error

root@gngrmysqlnd1:/usr/local/mysql/bin# ./ndbd –-initial /etc/init.d/mysql.server start
2014-05-25 13:48:20 [ndbd] INFO -- Angel connected to '172.16.3.225:1186'
2014-05-25 13:48:20 [ndbd] ERROR -- Failed to allocate nodeid, error: 'Error: Could not alloc node id at 172.16.3.225 port 1186: Connection done from wrong host ip 172.16.3.229.'
root@gngrmysqlnd1:/usr/local/mysql/bin#


Please do let me know where I am going wrong.
One more thing on the storage node, when i try to run root@gngrmysqlndb1:/etc/mysql# ndbd --initial -c localhost:1186
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 12


But when i run just the ./ndbd --initial, it starts as

root@gngrmysqlndb1:/etc/mysql# ndbd --initial
2014-05-25 13:50:44 [ndbd] INFO -- Angel connected to '172.16.3.225:1186'

Please do let me know where I am going wrong.

Thanks in advance

Options: ReplyQuote


Subject
Views
Written By
Posted
Connection done from wrong host ip
11910
May 25, 2014 02:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.