2008-09-27 14:36:08 [MgmSrvr] INFO -- Node 2: Initial start, waiting for 0000000000000008 to connect, nodes [ all: 000000000000000c connected: 0000000000000004 no-wait: 0000000000000000 ]
2008-09-27 14:36:11 [MgmSrvr] INFO -- Node 3: Initial start, waiting for 0000000000000004 to connect, nodes [ all: 000000000000000c connected: 0000000000000008 no-wait: 0000000000000000 ]
2008-09-27 14:36:11 [MgmSrvr] INFO -- Node 2: Initial start, waiting for 0000000000000008 to connect, nodes [ all: 000000000000000c connected: 0000000000000004 no-wait: 0000000000000000 ]
存储节点的错误日志如下所示:
Configuration error: Error : Could not alloc node id at 192.168.5.254 port 1186: Connection done from wrong host ip 192.168.5.45.
080927 14:35:15 [ERROR] Plugin 'ndbcluster' init function returned error.
080927 14:35:15 [ERROR] Plugin 'ndbcluster' registration as a STORAGE ENGINE failed.
080927 14:35:15 [Note] Event Scheduler: Loaded 0 events
080927 14:35:15 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.23-ndb-6.2.15-cluster-gpl' socket: '/tmp/mysql.sock' port: 3306 MySQL Cluster Server (GPL)
在sql节点创建测试表表时出现ndb引擎没有准备好的错误 提示:
mysql> use ctest;
Database changed
mysql> create table ctest(name varchar(50)) engine=ndbcluster;
ERROR 1005 (HY000): Can't create table 'ctest.ctest' (errno: 157)
管理节点配置文件内容如下config.ini:
#options affecting ndbd processes on all data nodes:
[NDBD DEFAULT]
NoOfReplicas=2 # Number of replicas
DataMemory=180M # How much memory to allocate for data storage
IndexMemory=80M # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.
# TCP/IP options:
[TCP DEFAULT]
portnumber=2202
# This the default; however, you can use any
# port that is free for all the hosts in cluster
# Note: It is recommended beginning with MySQL 5.0 that
# you do not specify the portnumber at all and simply allow
# the default value to be used instead
# Management process options:
[NDB_MGMD]
id=1
hostname=192.168.5.254 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node logfiles
# Options for data node "A":
[NDBD]
# (one [NDBD] section per data node)
id=2
hostname=192.168.5.45 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's datafiles
# Options for data node "B":
[NDBD]
id=3
hostname=192.168.5.30 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's datafiles
# SQL node options:
[MYSQLD]
id=4
hostname=192.168.5.238
# Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)
存储节点与sql节点配置文件如下 :
[MYSQLD]
ndbcluster
ndb-connectstring=192.168.5.254
[MYSQL_CLUSTER]
ndb-connectstring=192.168.5.254
从节点服务器或存储服务器上nmap管理服务器时看不到1186端口,但telnet 192.168.5.254可以连上,不过在输入get version与get status时没有任何反应(这是我在国外一贴子上看到的)。
最终确定为192.168.5.45上防火墙引起的故障,无法与服务器1186端口通话。