HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   MySQL Cluster On FC5 : error while unpacking from engine (http://www.howtoforge.com/forums/showthread.php?t=7686)

asyadiqin 25th October 2006 18:17

MySQL Cluster On FC5 : error while unpacking from engine
 
I have 1 management node (192.168.0.1) and 2 storage nodes (node1:192.168.0.2 / node2:192.168.0.3).

On the mgm node, the config.ini is as follows :-

Quote:

[NDBD DEFAULT]
NoOfReplicas=2

[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]

[NDB_MGMD]
HostName=192.168.0.1

[NDBD]
HostName=192.168.0.2
DataDir= /var/lib/mysql-cluster

[NDBD]
HostName=192.168.0.3
DataDir= /var/lib/mysql-cluster

[MYSQLD]
[MYSQLD]
On both node machines, the my.cnf are as follows:

Quote:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysql.server]
user=mysql

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.0.1

[mysql_cluster]
# IP address of the cluster management node
ndb-connectstring=192.168.0.1
On the mgm node, these are what is shown in the mgm console.

Quote:

-- NDB Cluster -- Management Client --
ndb_mgm> SHOW
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.2 (Version: 5.0.26, starting, Nodegroup: 0)
id=3 @192.168.0.3 (Version: 5.0.26, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1 (Version: 5.0.26)

[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
Previously, I have created a test database with 1 table (cluster.table_1). Below is the error in both storage nodes.

Quote:

[root@fc5-g2 ~]# mysql -uroot -pmypassword
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.26-max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cluster |
| db_ispconfig |
| mysql |
| test |
+--------------------+
5 rows in set (0.00 sec)

mysql> USE cluster;

Database changed
mysql> SHOW TABLES;
+-------------------+
| Tables_in_cluster |
+-------------------+
| table_1 |
+-------------------+
1 row in set, 1 warning (0.00 sec)

mysql> SELECT * FROM table_1;
ERROR 1105 (HY000): Failed to open 'table_1', error while unpacking from engine

mysql> DROP TABLE table_1;
ERROR 1051 (42S02): Unknown table 'table_1'

mysql> DROP DATABASE cluster;
ERROR 1051 (42S02): Unknown table 'table_1'
First of all, what is happening? Is there anyway I can either access or delete that database at all.

I am quite new to MySQL clustering and do not understand why this is happening. Any help is appreciated. Thanks.

mobilehunter 26th October 2006 03:29

I'm new to this cluster too, but from my experrience, i think better wait until the nodes in connected state on in starting state.
Some time it takes time to connect.

Hope help

asyadiqin 26th October 2006 11:19

Thanks for the info. However, you can see that the 2 nodes are connected to the mgm node.

Anyone have any idea what I should do to correct this?

falko 26th October 2006 13:49

Maybe the table is corrupt? You can try to repair it. Also, is there enough disk space on each node? What's the output of
Code:

df -h
on each node?

asyadiqin 26th October 2006 15:55

Quote:

Originally Posted by falko
Maybe the table is corrupt? You can try to repair it. Also, is there enough disk space on each node? What's the output of
Code:

df -h
on each node?

This is a freshly installed server with 80GB harddrive. So I don't think that diskspace is the issue here.

Maybe the table is corrupt. If so, how do I repair it?

Another thing is that I tried creating another database. When I tried creating a table in that database, it said the table exist, even though its an empty database.

Quote:

mysql> CREATE TABLE table1 (i int) ENGINE=ndbcluster;
ERROR 1050 (42S01): Table 'table1' already exists
Any ideas?

falko 27th October 2006 15:41

Quote:

Originally Posted by asyadiqin
Maybe the table is corrupt. If so, how do I repair it?

Have a look here: http://dev.mysql.com/doc/refman/5.0/...air-table.html

asyadiqin 27th October 2006 17:17

Thanks for the info, Falko. However, it seems that the repair was meant for MyISAM. Will this work for tables using NDBCLUSTER engines?

falko 28th October 2006 18:37

Good question. Never tried that...


All times are GMT +2. The time now is 02:10.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.