Troubles to set a cluster on a VirtualBox Ubuntu12.04 VMs environment : couldn't connect the data node to the management node
HI all,
I am experiencing some serious troubles to get the cluster working on a Virtualbox VMs based environment, although it has been accomplished by others ( full and excellent tutorial here
http://bromokun.wordpress.com/). Maybe I missed something or have something wrong in my configurations; I will share with you all the details here.
My goal is to create 5 VMs hosting all the ubuntu12.04 operating system (the Ubuntu version used In all the VMS is mysql-cluster-gpl-7.2.6-linux2..6-i686.tar.gz), the following VMs will be created:
- 192.168.0.101 : management node
- 192.168.0.102 : First data node
- 192.168.0.103 Second data node
- 192.168.0.104 : First Application node ( or Sql Node if you want)
- 192.168.0.105: Second Application node
I created under Virtualbox An internal network (option “attached to” under Virtualbox) and all the VMs san ping each other without any problem so far.
I also extracted and installed MySql Cluster with success on all the VMs and to make it easy I have the same user created under all VMs and also the same directory path: /home/user1/mySofts/MySQL-Cluster
I set the configuration files as follows: “config.ini” under the /home/user1/mySofts/MySQL-Cluster/conf on the management node ( IP Adress 192.168.0.101 ) and here is its content:
[ndb_mgmd]
hostname=192.168.0.101
PortNumber=1186
Datadir=/home/user1/mySofts/MySQL-Cluster/ndb_data
NodeId=1
[ndb default]
NoOfReplicas=2
Datadir=/ home/user1/mySofts/MySQL-Cluster/ndb_data
[ndbd]
Hostname=192.168.0.102
NodeId=3
[ndbd]
Hostname=192.168.0.103
NodeId=4
[mysqld]
Hostname=192.168.0.104
NodeId=5
[mysqld]
Hostname=192.168.0.105
NodeId=6
On the first data node ( IP Adress: 192.168.0.102) I have set a “my.cnf “ configuration file as following:
[client]
port=3306
socket==/ home/user1/mySofts/MySQL-Cluster/tmp
[mysqld]
ndbcluster
datadir=/home/user1/mySofts/MySQL-Cluster/mysqld1_data
basedir=/home/user1/mySofts/MySQL-Cluster/ mysql-cluster-gpl-7.2.6-linux2..6-i686
port=3306
ndb-connectstring=192.168.0.101:1186
[mysql_cluster]
ndb-connectstring=192.168.0.101:1186
I started the management node ( IP Adress 192.168.0.101) with success using the following command from the “home/user1/mySofts/MySQL-Cluster/ mysql-cluster-gpl-7.2.6-linux2..6-i686” directory :
./bin/ndb_mgmd – f home/user1/mySofts/MySQL-Cluster/ conf/config.ini --initial --configdir= home/user1/mySofts/MySQL-Cluster/ conf
Than I tried to start the first data node ( IP Adress 192.168.0.102) from the ‘/home/user1/mySofts/MySQL-Cluster/ mysql-cluster-gpl-7.2.6-linux2..6-i686”directory using the following command:
./bin/ndbd –c 192.168.0.101 1186
But the result was a great failure since I had the following output in the data node:
[ndbd] INFO --Angel connected to ‘192.168.0.101:1186’
[ndbd] INFO --Angel allocated nodeid: 3
[ndbd] WARNING – Cannot change directory to ‘home/user1/mySofts/MySQL-Cluster/ ndb_data’
[ndbd] ERROR -- Couldn’t start as daemon, error: ‘Failed to open logfile ‘/home/user1/mySofts/MySQL-Cluster/ndb_data/ndb-3_out.log’ for write, errno: 2’
I don’t see really where is the problem , is it an access issue between the 2 VMs ? I even disabled the IP filtering in both VMs ( like described here:
http://bromokun.wordpress.com/2012/07/07/disabling-ip-filtering-in-ubuntu-server/ ) but still get the same error!
For the record, I tried to set the cluster with all the nodes under a single VM and it works fine.
Any help will be appreciated as i don't really find a solution for my problem.
Thank you all