Bug #44246 ndb_mgmd Error reading cluster configuration does not show on command line
Submitted: 13 Apr 2009 20:29 Modified: 4 Apr 2014 13:48
Reporter: Jonathan Miller Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[13 Apr 2009 20:29] Jonathan Miller
Description:
When trying to start the mgmd I was in the wrong directory and entered the following:

$ /data0/cr_autotest/libexec/ndb_mgmd --reload -f config.ini 
2009-04-13 22:04:08 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.32 ndb-7.0.5-beta
2009-04-13 22:04:08 [MgmSrvr] INFO     -- Loaded config from '/data0/cr_autotest/mysql-cluster/ndb_1_config.bin.2'

But when I went to start ndbd:

/data0/cr_autotest/libexec/ndbd -c ndb13:14000

Unable to connect with connect string: nodeid=0,ndb13:14000
Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2009-04-13 22:05:38 [ndbd] INFO     -- Could not connect to ndb_mgmd
2009-04-13 22:05:38 [ndbd] INFO     --
error=2350
2009-04-13 22:05:38 [ndbd] INFO     -- Error handler shutting down system
2009-04-13 22:05:38 [ndbd] INFO     -- Error handler shutdown completed - aborting
sphase=0
exit=-1

So after reviewing the cluster log, you see the manager really failed to start:

2009-04-13 22:04:08 [MgmSrvr] INFO     -- Reading cluster configuration from 'config.ini'
2009-04-13 22:04:08 [MgmSrvr] ERROR    -- Error opening 'config.ini', error: 2, No such file or directory
2009-04-13 22:04:08 [MgmSrvr] ERROR    -- Could not load configuration from 'config.ini'

Wher redoing the command with path, mgmd started just fine,
/data0/cr_autotest/libexec/ndb_mgmd --reload -f /space/run/config.ini <- path
2009-04-13 22:07:42 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.32 ndb-7.0.5-beta
2009-04-13 22:07:42 [MgmSrvr] INFO     -- Loaded config from '/data0/cr_autotest

How to repeat:
With a running cluster
1) shut it down
2) edit config
3) give wrong path to config when restarting 

Suggested fix:
Print Errors to std_out

ERROR    -- Error opening 'config.ini', error: 2, No such file or directory
ERROR    -- Could not load configuration from 'config.ini'
[16 Apr 2009 12:12] Magnus Blåudd
it's a fine line between when to go into background
[7 Oct 2009 12:39] Magnus Blåudd
Duplicate of BUG#47595
[7 Oct 2009 12:56] Jonathan Miller
Hi,

I don't see how this is a duplicate of BUG#47595, can you please tell me how this is a duplicate?

Thanks,
/Jeb
[7 Oct 2009 13:03] Magnus Blåudd
Correct, it's the opposite problem :)
[4 Apr 2014 13:48] Magnus Blåudd
Posted by developer:
 
When the MySQL Cluster Management Server is started as a daemon it will only print the version before redirecting everything else to the cluster log file. This is by design. Thus I don't see the reported problem as a bug but rather an alternative approach to determine if ndb_mgmd failed to start must be used.
[4 Apr 2014 13:48] Magnus Blåudd
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php