简体   繁体   English

MySQL Cluster - [[ndbd] ERROR - 无法作为守护进程启动,错误:'无法打开日志文件]

[英]MySQL Cluster - [ [ndbd] ERROR — Couldn't start as daemon, error: 'Failed to open logfile ]

recently I want to set up mysql cluster, one Mgmt node, one sql node and two data node, it seems successfully installed and Mgmt node started, but when I try to start data node, I hit a problem... 最近我想设置mysql集群,一个Mgmt节点,一个sql节点和两个数据节点,它似乎已经成功安装并且Mgmt节点启动了,但是当我尝试启动数据节点时,我遇到了一个问题......

here is the error message when I try to start data node: 这是我尝试启动数据节点时的错误消息:

来自我的datanode的错误消息

Does anyone know what's going wrong? 有谁知道出了什么问题? basically I follow the step by step tutorial on this site and this site 基本上我按照本网站本网站上的分步教程

It would be very appreciated if you can give me some advice! 如果你能给我一些建议,我们将不胜感激! thanks 谢谢

Okay, I came up with a solution to fix this issue : 013-01-18 09:26:10 [ndbd] ERROR -- Couldn't start as daemon, error: 'Failed to open logfile 好的,我想出了一个解决方案来解决这个问题: 013-01-18 09:26:10 [ndbd] ERROR -- Couldn't start as daemon, error: 'Failed to open logfile

I was stuck with the same issue and after exploring I opened the $MY_CLUSTER_INSTALLATION/ndb_data/ndb_1_cluster.log 我遇到了同样的问题,在探索之后我打开了$MY_CLUSTER_INSTALLATION/ndb_data/ndb_1_cluster.log

1.I found the following message present in the log: 1.我在日志中发现以下消息:

2013-01-18 09:24:50 [MgmtSrvr] INFO     -- Got initial configuration 
from 'conf/config.ini',
will try to set it when all ndb_mgmd(s) started
2013-01-18 09:24:50 [MgmtSrvr] INFO     -- Node 1: Node 1 Connected
2013-01-18 09:24:54 [MgmtSrvr] ERROR    -- Unable to bind management 
service port: *:1186!
Please check if the port is already used,
(perhaps a ndb_mgmd is already running),
and if you are executing on the correct computer
2013-01-18 09:24:54 [MgmtSrvr] ERROR    -- Failed to start mangement service!

2.I checked the services running on port on my Mac machine using following command: 2.我使用以下命令检查了我的Mac机器上端口上运行的服务:

lsof -i :1186

And sure enough, I found the ndb_mgmd(s): 果然,我找到了ndb_mgmd(s):

COMMAND  PID          USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ndb_mgmd 418     8u  IPv4 0x33a882b4d23b342d      0t0  TCP *:mysql-cluster (LISTEN)
ndb_mgmd 418     9u  IPv4 0x33a882b4d147fe85      0t0  TCP localhost:50218->localhost:mysql-cluster (ESTABLISHED)
ndb_mgmd 418    10u  IPv4 0x33a882b4d26901a5      0t0  TCP localhost:mysql-cluster->localhost:50218 (ESTABLISHED)

3.To kill the processes on the specific port (for me : 1186) I ran following command: 3.要杀死特定端口上的进程(对我来说:1186)我运行了以下命令:

sof -P | grep '1186' | awk '{print $2}' | xargs kill -9

4.I repeated the steps listed in mySql Cluster installation pdf again: 4.我再次重复mySql Cluster安装pdf中列出的步骤:

$PATH/mysqlc/bin/ndb_mgmd -f conf/config.ini --initial --configdir=/$PATH/my_cluster/conf/
$PATH/mysqlc/bin/ndbd -c localhost:1186

Hope this helps! 希望这可以帮助!

Hope this will be useful 希望这会有用
In my case, two data node were connected already 就我而言,已经连接了两个数据节点

you can check this out in your management node 您可以在管理节点中查看此信息

[root@ab0]# ndb_mgm  
-- NDB Cluster -- Management Client --  
ndb_mgm> show  

what i did was 我做的是什么

ndb_mgm> shutdown 

and then execute the restart command. 然后执行restart命令。 it works for me 这个对我有用

检查datadir是否存在,并且可以在datanode1上使用“ls -ld / home / netdb / mysql_cluster / data”写入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM