Bug #65451 Windows Services don't start
Submitted: 29 May 2012 15:07 Modified: 30 May 2012 14:26
Reporter: Ivo Cazemier Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.5.22-ndb-7.2.6-gpl OS:Windows (7)
Assigned to: CPU Architecture:Any
Tags: 7.2.6, MySQL Cluster, service, will start manually, windows, wont start as service

[29 May 2012 15:07] Ivo Cazemier
Description:
- First we install from the ZIP (32bits) on two servers (win7)
- Yes, there are only 2, both run a managernode, datanode and mysql daemon...
- We start the nodes as follows (cmd as Administrator):
  ( According to http://downloads.mysql.com/tutorials/cluster/GetMySQLClusterRunningWindows.pdf )
  # start /B ndb_mgmd -f  "D:/cluster/clusterdata/conf/config.ini" --initial --configdir="D:/cluster/clusterdata/conf"
  # start /B ndbd -c localhost:1186
  # start /B mysqld --defaults-file="D:/cluster/clusterdata/conf/my.cnf"

- We can import a existing database with MySQL WorkBench 5.2CE
- Data is in sync, works!
- We stop by executing:
  # mysqladmin -u root -h 127.0.0.1 -P3306 shutdown
  # ndb_mgm -e shutdown
- We check and wait for a while to let it shutdown properly.
- Cluster runs ok, so lets make/install windows services:
  # D:\cluster\mysqlc\bin\ndb_mgmd --install --config-file="D:/cluster/clusterdata/conf/config.ini" --configdir="D:/cluster/clusterdata/conf"
  # D:\cluster\mysqlc\bin\ndbd --install -c localhost:1186
  # D:\cluster\mysqlc\bin\mysqld --install "MySQL Daemon" --defaults-file="D:/cluster/clusterdata/conf/my.cnf"
  All of the services where successfully created..

- So, reboot the servers.
- But here are the problems! Only the MySQL Daemon is running but
  the manager node and the datanode are not running!
  Or only the managernode is running with a reboot.
  These two combinations happen.

Here are the configs:
- - - - - - - - - - - -== config.ini ==- - - - - - - - - - - - - 
[ndbd default]
NoOfReplicas=2

[ndb_mgmd]
HostName=192.168.175.51
ArbitrationRank=0
DataDir=D:/cluster/clusterdata/ndb_data
NodeId = 101

[ndb_mgmd]
HostName=192.168.175.52
ArbitrationRank=0
DataDir=D:/cluster/clusterdata/ndb_data
NodeId = 102

[ndbd]
HostName=192.168.175.51
NodeId=1

[ndbd]
HostName=192.168.175.52
NodeId=2

[mysqld]
HostName=192.168.175.51
NodeId=51

[mysqld]
HostName=192.168.175.52
NodeId=52

- - - - - - - - - - - -== my.cnf (server-id=51) ==- - - - - - - - - - - - -
[mysqld]
ndbcluster
ndb-connectstring=localhost
default-storage-engine=ndbcluster
datadir=D:/cluster/clusterdata/mysqld_data
basedir=D:/cluster/mysqlc
port=3306
server-id=51
log-bin=iSCAPE_PC1-bin

- - - - - - - - - - - -== my.cnf (server-id=52) ==- - - - - - - - - - - - -
[mysqld]
ndbcluster
ndb-connectstring=localhost
default-storage-engine=ndbcluster
datadir=D:/cluster/clusterdata/mysqld_data
basedir=D:/cluster/mysqlc
port=3306
server-id=52
log-bin=iSCAPE_PC2-bin

How to repeat:
See "Description"
[30 May 2012 14:26] Ivo Cazemier
Dear Madam/Sir,

At the moment it works again!
Problem solved...

We made a boo boo..

We forgot to mention the datadir at [ndbd]...
( When not configured, the engine goes free wheeling: Started from the cmd (win), the table data was written at: c:\Users\user\..., when started as service at c:\windows\system32\... )
So, configure the datadir! the cluster manager doesn't tell you this!

So, sorry for the inconvenience.

Keep it up!