PDA

View Full Version : mysql-cluster-5.1.42 attemp


SlowJet
2nd January 2010, 09:14 AM
I tried to get a cluster going on one computer.

It is not all that much more after you get mysqld working.

I start the ndb-mgmd, the ndbd, and then the mysqld.

I had trouble with the pot socket, default for cluster ndb's is 1186 but it wanted a high 50k+ port.
ndb's want a host name, mysqld's use the socket

After it started successfully, the mysql client would only use 127.0.0.1
Just as I was about to create a table and watch things happen, setroubleshoot logged 10MB and turned the log file over twice. It could not be stopped with kill as it comes right back up.
So I had to reboot -f and try again later.

Here is some log messages from the cluster NDB parts and the innodb from the regular mysqld


# cd /
/]# service mysqld start
Starting MySQL: [ OK ]
/]# cd /var/lib/mysql-cluster
mysql-cluster]# ls -la
total 36
drwxr-xr-x. 3 mysql mysql 4096 Jan 1 23:18 .
drwxr-xr-x. 44 root root 4096 Jan 1 23:58 ..
-rw-------. 1 mysql mysql 156 Jan 1 23:17 config.ini
-rw-r--r--. 1 mysql mysql 2583 Jan 1 23:56 ndb_1_cluster.log
-rw-r-----. 1 mysql mysql 661 Jan 1 23:56 ndb_1_out.log
-rw-r--r--. 1 mysql mysql 5 Jan 1 23:17 ndb_1.pid
drwxr-x---. 9 mysql mysql 4096 Jan 1 23:19 ndb_2_fs
-rw-r--r--. 1 mysql mysql 875 Jan 1 23:56 ndb_2_out.log
-rw-r--r--. 1 mysql mysql 5 Jan 1 23:18 ndb_2.pid
mysql-cluster]# cat ndb_1_cluster.log
23:17:25 [MgmSrvr] INFO -- NDB Cluster Management Server. Version 5.1.42
23:17:25 [MgmSrvr] INFO -- Id: 1, Command port: 1186
23:17:26 [MgmSrvr] INFO -- Mgmt server state: nodeid 3 reserved for ip 127.0.0.1, m_reserved_nodes 000000000000000a.
23:17:26 [MgmSrvr] INFO -- Node 3: mysqld --server-id=1
23:18:40 [MgmSrvr] INFO -- Mgmt server state: nodeid 2 reserved for ip 127.0.0.1, m_reserved_nodes 000000000000000e.
23:18:40 [MgmSrvr] INFO -- Node 1: Node 2 Connected
23:18:41 [MgmSrvr] INFO -- Mgmt server state: nodeid 2 freed, m_reserved_nodes 000000000000000a.
23:18:42 [MgmSrvr] INFO -- Node 2: Start phase 3 completed (initial start)
23:19:06 [MgmSrvr] INFO -- Node 2: Start phase 4 completed (initial start)
23:19:09 [MgmSrvr] INFO -- Node 2: Local checkpoint 1 started. Keep GCI = 1 oldest restorable GCI = 1
23:19:10 [MgmSrvr] INFO -- Node 2: Start phase 5 completed (initial start)
23:19:10 [MgmSrvr] INFO -- Node 2: President restarts arbitration thread [state=1]
23:19:10 [MgmSrvr] INFO -- Node 2: Start phase 7 completed (initial start)
23:19:10 [MgmSrvr] INFO -- Node 2: Communication to Node 3 opened
23:19:10 [MgmSrvr] INFO -- Node 2: Communication to Node 4 opened
23:19:10 [MgmSrvr] INFO -- Node 2: Communication to Node 5 opened
23:19:10 [MgmSrvr] INFO -- Node 2: Start phase 8 completed (initial start)
23:19:10 [MgmSrvr] INFO -- Node 2: Start phase 100 completed (initial start)
23:19:10 [MgmSrvr] INFO -- Node 2: Start phase 101 completed (initial start)
23:19:10 [MgmSrvr] INFO -- Node 2: Started (version 5.1.42)
23:19:10 [MgmSrvr] INFO -- Node 2: Node 1: API version 5.1.42
23:19:10 [MgmSrvr] INFO -- Node 2: Started arbitrator node 1 [ticket=15ee0001ede6e62d]
23:21:41 [MgmSrvr] INFO -- Mgmt server state: nodeid 4 reserved for ip 127.0.0.1, m_reserved_nodes 000000000000001a.
23:21:41 [MgmSrvr] INFO -- Node 4: mysqld --server-id=1
23:21:53 [MgmSrvr] INFO -- Mgmt server state: nodeid 4 freed, m_reserved_nodes 000000000000000a.
23:56:08 [MgmSrvr] INFO -- Node 2: Node shutdown aborted
mysql-cluster]# ls -la
total 36
drwxr-xr-x. 3 mysql mysql 4096 Jan 1 23:18 .
drwxr-xr-x. 44 root root 4096 Jan 1 23:58 ..
-rw-------. 1 mysql mysql 156 Jan 1 23:17 config.ini
-rw-r--r--. 1 mysql mysql 2583 Jan 1 23:56 ndb_1_cluster.log
-rw-r-----. 1 mysql mysql 661 Jan 1 23:56 ndb_1_out.log
-rw-r--r--. 1 mysql mysql 5 Jan 1 23:17 ndb_1.pid
drwxr-x---. 9 mysql mysql 4096 Jan 1 23:19 ndb_2_fs
-rw-r--r--. 1 mysql mysql 875 Jan 1 23:56 ndb_2_out.log
-rw-r--r--. 1 mysql mysql 5 Jan 1 23:18 ndb_2.pid
mysql-cluster]# cat ndb_1_out.log
<snip>
NDB Cluster Management Server. Version 5.1.42
Id: 1, Command port: 1186
asked to stop 2
mysql-cluster]# cat ndb_2_out.log
23:18:40 [ndbd] INFO -- Angel pid: 5612 ndb pid: 5614
23:18:40 [ndbd] INFO -- NDB Cluster -- DB node 2
23:18:40 [ndbd] INFO -- Version 5.1.42 --
23:18:40 [ndbd] INFO -- Configuration fetched at localhost port 1186
23:18:40 [ndbd] INFO -- Start initiated (version 5.1.42)
23:18:40 [ndbd] INFO -- Ndbd_mem_manager::init(1) min: 20Mb initial: 20Mb
Adding 20Mb to ZONE_LO (1,639)
WOPool::init(61, 9)
RWPool::init(82, 13)
RWPool::init(a2, 18)
RWPool::init(c2, 13)
RWPool::init(122, 18)
RWPool::init(142, 15)
WOPool::init(41, 8)
RWPool::init(e2, 12)
RWPool::init(102, 51)
WOPool::init(21, 6)
m_active_buckets.set(0)
23:56:36 [ndbd] INFO -- Watchdog: User time: 1498 System time: 2377
23:56:36 [ndbd] WARNING -- Watchdog: Warning overslept 1027 ms, expected 0 ms.
mysql-cluster]# cd /var/log/audit
audit]# ls -la
total 15784
drwxr-x---. 2 root root 4096 Jan 1 23:54 .
drwxr-xr-x. 17 root root 4096 Jan 1 23:58 ..
-rw-------. 1 root root 398869 Jan 2 00:07 audit.log
-r--------. 1 root root 5243169 Jan 1 23:54 audit.log.1
-r--------. 1 root root 5242925 Jan 1 23:31 audit.log.2

# The innodb tables

mysql> show status;
+-----------------------------------+----------+
| Variable_name | Value |
+-----------------------------------+----------+

| Innodb_buffer_pool_pages_data | 64
| Innodb_buffer_pool_pages_dirty | 0
| Innodb_buffer_pool_pages_flushed | 0
| Innodb_buffer_pool_pages_free | 4032
| Innodb_buffer_pool_pages_misc | 0
| Innodb_buffer_pool_pages_total | 4096 |
| Innodb_buffer_pool_read_ahead_rnd | 1 |
| Innodb_buffer_pool_read_ahead_seq | 0 |
| Innodb_buffer_pool_read_requests | 166 |
| Innodb_buffer_pool_reads | 13 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 0 |
| Innodb_data_fsyncs | 3 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 3231744 |
| Innodb_data_reads | 26 |
| Innodb_data_writes | 3 |
| Innodb_data_written | 1536 |
| Innodb_dblwr_pages_written | 0 |
| Innodb_dblwr_writes | 0 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 0 |
| Innodb_log_writes | 1 |
| Innodb_os_log_fsyncs | 3 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 512 |
| Innodb_page_size | 16384 |
| Innodb_pages_created | 0 |
| Innodb_pages_read | 64 |
| Innodb_pages_written | 0 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 0 |
| Innodb_row_lock_time_avg | 0 |
| Innodb_row_lock_time_max | 0 |
| Innodb_row_lock_waits | 0 |
| Innodb_rows_deleted | 0 |
| Innodb_rows_inserted | 0 |
| Innodb_rows_read | 0 |
| Innodb_rows_updated | 0 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 28979 |
| Key_blocks_used | 16 |
| Key_read_requests | 38 |
| Key_reads | 16 |
| Key_write_requests | 0 |
| Key_writes | 0 |
| Last_query_cost | 0.000000 |
| Max_used_connections | 1 |
| Ndb_cluster_node_id | 0 |
| Ndb_config_from_host | |
| Ndb_config_from_port | 0 |
| Ndb_number_of_data_nodes | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 28 |
| Open_streams | 0 |
| Open_table_definitions | 19 |
| Open_tables | 12 |
| Opened_files | 75 |
| Opened_table_definitions | 4 |
| Opened_tables | 4 |
| Prepared_stmt_count | 0 |
| Qcache_free_blocks | 1 |
| Qcache_free_memory | 33545600 |
| Qcache_hits | 0 |
| Qcache_inserts | 0 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 2 |
| Qcache_queries_in_cache | 0 |
| Qcache_total_blocks | 1 |
| Queries | 15 |
| Questions | 14 |
| Rpl_status | NULL |
<snip>
| Threads_connected | 1 |
| Threads_created | 1 |
| Threads_running | 1 |
| Uptime | 336 |
| Uptime_since_flush_status | 336 |
+-----------------------------------+----------+
295 rows in set (0.02 sec)

SJ