mysql集群报错 'No free node id found for mysqld(API).'
错误描述
Mysql集群的sql node无法连上,mgm
mgm日志错误信息如下
2017-11-27 20:28:35 [MgmtSrvr] WARNING -- Failed to allocate nodeid for API at 192.168.1.104. Returned error: 'No free node id found for mysqld(API).'
2017-11-27 20:28:36 [MgmtSrvr] INFO -- Alloc node id 4 failed, no new president yet
2017-11-27 20:28:37 [MgmtSrvr] INFO -- Alloc node id 4 failed, no new president yet - Repeated 5 times
2017-11-27 20:28:37 [MgmtSrvr] INFO -- Node 3: Initial start, waiting for 2 to connect, nodes [ all: 2 and 3 connected: 3 no-wait: ]
mysql服务错误信息(sql node)
2017-11-28T03:18:43.565265Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-11-28T03:18:43.566664Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-11-28T03:18:43.569894Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
2017-11-28T03:18:43.570676Z 4 [Warning] NDB: Failed to acquire global schema lock, error: (4009)Cluster Failure
mgm show信息
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.1.101 (mysql-5.7.20 ndb-7.5.8, starting, Nodegroup: 0)
id=3 @192.168.1.102 (mysql-5.7.20 ndb-7.5.8, starting, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.1.103 (mysql-5.7.20 ndb-7.5.8)
[mysqld(API)] 3 node(s)
id=4 (not connected, accepting connect from any host)
配置信息
说明
- 服务器:linux centos 7
- mysql-cluster: mysql-cluster-community-7.5.8-1.el7.x86_64.rpm-bundle
服务器信息
IP | 节点名称 | 描述 |
---|---|---|
192.168.1.103 | mgm | 集群管理节点 |
192.168.1.101 | data node | 集群数据节点 |
192.168.1.102 | data node | 集群数据节点 |
192.168.1.104 | sql node | 集群mysqld节点 |
mgm配置信息
[ndbd default]
NoOfReplicas=2 # Number of replicas
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # How much memory to allocate for index storage
ServerPort=2202
[ndb_mgmd]
HostName=192.168.1.103 # Hostname or IP address of MGM node
DataDir=/var/lib/mysql-cluster # Directory for MGM node log files
[ndbd]
HostName=192.168.1.101 # Hostname or IP address
NodeId=2 # Node ID for this data node
DataDir=/opt/mysql/data # Directory for this data node's data files
[ndbd]
HostName=192.168.1.102 # Hostname or IP address
NodeId=3 # Node ID for this data node
DataDir=/opt/mysql/data # Directory for this data node's data files
[mysqld]
# SQL node options:
HostName=192.168.1.104
NodeId=4
mysql 配置
[mysqld]
user=mysql
ndbcluster
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
default-storage-engine=NDBCLUSTER
ndb-connectstring=192.168.1.103
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql_cluster]
ndb-connectstring=192.168.1.103
我的启动顺序
mgm(103) -> data node1(101) -> data node2(102) -> sql node(104)
已尝试过的方法
- mgm中添加空的[mysqld]
- 重装mysql
- mysql5.7版本中没有
mysql_safe
所以无法尝试这种方法
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你DataNode都还没起来
先把DataNode起来再看