Arvin
Arvin

Reputation: 451

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...

here is the error message when I try to start data node:

error message from my 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

Upvotes: 1

Views: 6229

Answers (3)

Assy
Assy

Reputation: 191

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. it works for me

Upvotes: 1

aces.
aces.

Reputation: 4122

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

I was stuck with the same issue and after exploring I opened the $MY_CLUSTER_INSTALLATION/ndb_data/ndb_1_cluster.log

1.I found the following message present in the log:

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:

lsof -i :1186

And sure enough, I found the 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:

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

4.I repeated the steps listed in mySql Cluster installation pdf again:

$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!

Upvotes: 2

Andrew Morgan
Andrew Morgan

Reputation: 570

Check that the datadir exists and is writeable with "ls -ld /home/netdb/mysql_cluster/data" on datanode1.

Upvotes: 0

Related Questions