您好,登錄后才能下訂單哦!
[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
命令啟動后,沒有真的啟動,db_sync_short_video_oss_r2m0_d也沒有打日志
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日志,當同步進程成功啟動后,會變成db_sync_short_video_oss_r2m0_d目錄,目前看日志有如下報錯
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'
說缺少了一個叫area_no的字段,這個需要在sync_server表多加入一個字段
alter table myshard_sync_server add area_no int(11) DEFAULT 1;
同時在myshard.xml上的area字段,也改為1,這個表示區域號,美洲區,歐洲區,亞洲區的編號
[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>
為了加載元數據,重啟shard,shardadmin,sync,重啟完以后,看一下重啟的時間是不是剛剛,這樣保證是已經成功重啟的,另外所有節點都加入nc腳本,同時去看是否有人來拉取自己的數據
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
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。