您好,登錄后才能下訂單哦!
[root@localhost bin]# ./sync_ctrl start start the sync_d .... start the sync_d 0.... Target:sync_d 0 is running with pid 143899 ... start ok [root@localhost bin]# ./sync_ctrl status sync_d 0 is down
命令啟動(dòng)后,沒(méi)有真的啟動(dòng),db_sync_short_video_oss_r2m0_d也沒(méi)有打日志
drwxr-xr-x. 2 root root 4096 May 16 00:10 sdaiostat_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shardadmin_d drwxr-xr-x. 2 root root 4096 May 16 17:48 shardadmin_short_video_oss_20_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_200_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_20b_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_20c_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_20d_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_20e_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_20f_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_210_d drwxr-xr-x. 2 root root 4096 May 16 16:28 shard_short_video_oss_211_d
可以看sync_d日志,當(dāng)同步進(jìn)程成功啟動(dòng)后,會(huì)變成db_sync_short_video_oss_r2m0_d目錄,目前看日志有如下報(bào)錯(cuò)
May 17 15:42:17 warning sync_d[]: [tid:143826] [MetaData::loadGlobalInfo] myshard_user empty 'SYNC' May 17 15:42:17 crit sync_d[]: [tid:143826] [MetaData::loadSyncInfo] Unknown column 'area_no' in 'field list' May 17 15:45:58 warning sync_d[]: [tid:143899] [MetaData::loadGlobalInfo] myshard_user empty 'SYNC' May 17 15:45:58 crit sync_d[]: [tid:143899] [MetaData::loadSyncInfo] Unknown column 'area_no' in 'field list'
說(shuō)缺少了一個(gè)叫area_no的字段,這個(gè)需要在sync_server表多加入一個(gè)字段
alter table myshard_sync_server add area_no int(11) DEFAULT 1;
同時(shí)在myshard.xml上的area字段,也改為1,這個(gè)表示區(qū)域號(hào),美洲區(qū),歐洲區(qū),亞洲區(qū)的編號(hào)
[root@localhost sync_r1m0]# cat /data/rds/myshard/bin/myshard.xml <?xml version="1.0" encoding="utf-8" ?> <conf> <business alias="short_video_oss">short_video_oss</business> <group name="">1</group> <station>0</station> <area>1</area> <center-mode>0</center-mode> <metadata-db> <ip>127.0.0.1</ip> <port>6301</port> <db>myshard_metadata</db> <user>XXXXX</user> <pass>XXXXXX</pass> </metadata-db> <metadata-db-backup> <ip>127.0.0.1</ip> <port>6301</port> <db>myshard_metadata</db> <user>XXXXXX</user> <pass>XXXXX</pass> </metadata-db-backup> <sync> <log-expire-days>2</log-expire-days> </sync> </conf>
為了加載元數(shù)據(jù),重啟shard,shardadmin,sync,重啟完以后,看一下重啟的時(shí)間是不是剛剛,這樣保證是已經(jīng)成功重啟的,另外所有節(jié)點(diǎn)都加入nc腳本,同時(shí)去看是否有人來(lái)拉取自己的數(shù)據(jù)
shard_local Read_offset 1052 shard_local Read_speed 0 shard_local Read_bytes_behind 0 sync_r2m0 Read_offset 1052 sync_r2m0 Read_speed 0 sync_r2m0 Read_bytes_behind 0 sync_r3m0 Read_offset 1052 sync_r3m0 Read_speed 0 sync_r3m0 Read_bytes_behind 0 sync_r4m0 Read_offset 1052 sync_r4m0 Read_speed 0 sync_r4m0 Read_bytes_behind 0 shard_remote Read_offset 698 shard_remote Read_speed 0 shard_remote Read_bytes_behind 0
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。