mysql cluster数据节点启动问题

giant7 2014-12-05 03:58:23
本人在搭建MySQL cluster(版本7.2), 管理节点的配置如下:

[ndbd default]
NoOfReplicas=1
DataMemory=200M
IndexMemory=20M


[ndb_mgmd]
NodeId=1
hostname=172.3.200.156
datadir=/var/lib/mysql-cluster/


[ndbd]
NodeId=5
hostname=172.3.200.161
datadir=/usr/local/mysql/ndbdata/


[ndbd]
NodeId=6
hostname=172.3.200.162
datadir=/usr/local/mysql/ndbdata/


[ndbd]
NodeId=7
hostname=172.3.200.163
datadir=/usr/local/mysql/ndbdata/


[ndbd]
NodeId=8
hostname=172.3.200.164
datadir=/usr/local/mysql/ndbdata/


[mysqld]
hostname=172.3.200.158


[mysqld]
hostname=172.3.200.160
[mysqld]
[mysqld]



数据节点的配置如下:
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock


# Here follows entries for some specific programs


# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
ndbcluster
ndb-connectstring = 172.3.200.156
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8


log-bin=mysql-bin


# binary logging format - mixed recommended
binlog_format=mixed


server-id = 1


[mysqldump]
quick
max_allowed_packet = 16M


[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates


[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M


[mysqlhotcopy]
interactive-timeout


[mysql_cluster]
ndb-connectstring = 172.3.200.156


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid



启动数据节点: ndbd --initial
报错如下:

Unable to connect with connect string: nodeid=0,172.3.200.156:1186
Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2014-12-03 15:34:15 [ndbd] ERROR -- Could not connect to management server, error: ''



本人ping管理节点,可以ping通,到底是什么原因了???
上面的错误该如何解决了?
...全文
849 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zz0072010 2016-01-28
  • 打赏
  • 举报
回复
mysqld没连上,等datanode的starting没了再去连
giant7 2014-12-09
  • 打赏
  • 举报
回复
引用 1 楼 benluobobo 的回复:
连接问题 从数据节点去ping管理节点 反过来也试试看
好奇怪啊,今天竟然正常了。 但是又有一个新的问题出现了: 在 SQL 节点1 上插入数据报错: mysql> create table IRtable(id int)engine=ndb; ERROR 157 (HY000): Could not connect to storage engine 我到 管理节点去查看配置文件: ndb_mgm> show Connected to Management Server at: localhost:1186 Cluster Configuration --------------------- [ndbd(NDB)] 4 node(s) id=2 (not connected, accepting connect from 172.3.200.161) id=3 @172.3.200.162 (mysql-5.5.40 ndb-7.2.18, starting, Nodegroup: 0) id=4 (not connected, accepting connect from 172.3.200.163) id=5 (not connected, accepting connect from 172.3.200.164) [ndb_mgmd(MGM)] 1 node(s) id=1 @172.3.200.156 (mysql-5.5.40 ndb-7.2.18) [mysqld(API)] 5 node(s) id=8 (not connected, accepting connect from 172.3.200.158) id=9 (not connected, accepting connect from 172.3.200.159) id=10 (not connected, accepting connect from 172.3.200.160) id=11 (not connected, accepting connect from any host) id=12 (not connected, accepting connect from any host)
陈丁恺 2014-12-08
  • 打赏
  • 举报
回复
会不会是防火墙的问题
giant7 2014-12-05
  • 打赏
  • 举报
回复
引用 1 楼 benluobobo 的回复:
连接问题 从数据节点去ping管理节点 反过来也试试看
互相ping,能ping通,没有任何问题啊! 到底是什么原因了?
benluobo 2014-12-05
  • 打赏
  • 举报
回复
连接问题 从数据节点去ping管理节点 反过来也试试看

56,803

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧