Zabbix Proxy斷電重啟故障處理指南_第1頁
Zabbix Proxy斷電重啟故障處理指南_第2頁
Zabbix Proxy斷電重啟故障處理指南_第3頁
Zabbix Proxy斷電重啟故障處理指南_第4頁
Zabbix Proxy斷電重啟故障處理指南_第5頁
已閱讀5頁,還剩5頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、 Zabbix Proxy 斷電重啟故障處理指南 一次斷電意外導(dǎo)致本地使用中的zabbix_proxy無法正常工作,隨即進(jìn)行排查。一、 通過系統(tǒng)命令查看proxy狀態(tài)原以為一切正常,但仔細(xì)查看zabbix有關(guān)服務(wù)時,卻沒有發(fā)現(xiàn)發(fā)現(xiàn)相應(yīng)的proxy端口在使用。圖1圖2那實(shí)際上zabbix_proxy是沒在工作的。二、 對其日志文件進(jìn)行查看查看命令:tail -n 1000 zabbix_proxy.log #篩選最新的1000行數(shù)據(jù)進(jìn)行查看。圖3從最新的幾行報(bào)錯可以出看是數(shù)據(jù)庫連接失敗引起的問題。三、 查看數(shù)據(jù)庫狀態(tài)圖4四、 查看指定目錄下的是否有對應(yīng)sock文件圖5沒該文件。五、 查看數(shù)據(jù)庫報(bào)

2、錯日志error.log(查看命令使用了“tail -n 1000 error.log”)如果不清楚位置可使用命令 find / -name error.log 進(jìn)行全局查找.圖6可以嘗試在f中配置相應(yīng)的參數(shù)(0),而打開數(shù)據(jù)庫。六、 配置數(shù)據(jù)庫配置文件f,增加一行innodb_force_recovery = 1圖7innodb_force_recovery級別 含義1 (SRV_FORCE_IGNORE_CORRUPT)忽略檢查到的corrupt頁2 (SRV_FORCE_NO_BACKGROUND)阻止主線程的運(yùn)行,如主線 程需要執(zhí)行full purge操作,會導(dǎo)致crash3 (SRV

3、_FORCE_NO_TRX_UNDO)不執(zhí)行事務(wù)回滾操作。4 (SRV_FORCE_NO_IBUF_MERGE)不執(zhí)行插入緩沖的合并操作。5 (SRV_FORCE_NO_UNDO_LOG_SCAN)不查看重做日志,InnoDB存儲引擎會將未提交的事務(wù)視為已提交6 (SRV_FORCE_NO_LOG_REDO)不執(zhí)行前滾的操作。七、 重新啟動數(shù)據(jù)庫,再去查看數(shù)據(jù)庫日志(error.log)圖8存在該部分錯表。八、 登錄數(shù)據(jù)庫,刪除錯表mysqlDROP TABLE mysql.innodb_index_stats;mysqlDROP TABLE mysql.innodb_table_stats;

4、mysqlDROP TABLE mysql.slave_master_info;mysqlDROP TABLE mysql.slave_relay_log_info;mysqlDROP TABLE mysql.slave_worker_info;圖9未找到該表。九、 關(guān)閉數(shù)據(jù)庫,刪除舊文件rm -rf /data/mysql/data/mysql/innodb_index_stats.*rm -rf /data/mysql/data/mysql/innodb_table_stats.*rm -rf /data/mysql/data/mysql/slave_master_info.*rm -rf

5、 /data/mysql/data/mysql/slave_relay_log_info.*rm -rf /data/mysql/data/mysql/slave_worker_info.*圖10圖11十、 打開數(shù)據(jù)庫,重新構(gòu)建數(shù)據(jù)庫表如下執(zhí)行內(nèi)容共5條,一條一條地復(fù)制執(zhí)行即可:圖12為其中一條的執(zhí)行結(jié)果。USE mysql;1.CREATE TABLEinnodb_index_stats(database_namevarchar(64) COLLATE utf8_bin NOT NULL,table_namevarchar(64) COLLATE utf8_bin NOT NULL,inde

6、x_namevarchar(64) COLLATE utf8_bin NOT NULL,last_updatetimestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,stat_namevarchar(64) COLLATE utf8_bin NOT NULL,stat_valuebigint(20) unsigned NOT NULL,sample_sizebigint(20) unsigned DEFAULT NULL,stat_descriptionvarchar(1024) COLLATE utf8

7、_bin NOT NULL,PRIMARY KEY (database_name,table_name,index_name,stat_name) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;2.CREATE TABLEinnodb_table_stats(database_namevarchar(64) COLLATE utf8_bin NOT NULL,table_namevarchar(64) COLLATE utf8_bin NOT NULL,last_updatetimestamp NO

8、T NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,n_rowsbigint(20) unsigned NOT NULL,clustered_index_sizebigint(20) unsigned NOT NULL,sum_of_other_index_sizesbigint(20) unsigned NOT NULL,PRIMARY KEY (database_name,table_name) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSI

9、STENT=0;3.CREATE TABLEslave_master_info(Number_of_linesint(10) unsigned NOT NULL COMMENT Number of lines in the file.,Master_log_nametext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT The name of the master binary log currently being read from the master.,Master_log_posbigint(20) unsigned NOT

10、 NULL COMMENT The master log position of the last read event.,Hostchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT COMMENT The host name of the master.,User_nametext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The user name used to connect to the master.,User_passwordtext CHARACTER SET

11、utf8 COLLATE utf8_bin COMMENT The password used to connect to the master.,Portint(10) unsigned NOT NULL COMMENT The network port used to connect to the master.,Connect_retryint(10) unsigned NOT NULL COMMENT The period (in seconds) that the slave will wait before trying to reconnect to the master.,En

12、abled_ssltinyint(1) NOT NULL COMMENT Indicates whether the server supports SSL connections.,Ssl_catext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The file used for the Certificate Authority (CA) certificate.,Ssl_capathtext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The path to the Certificate Auth

13、ority (CA) certificates.,Ssl_certtext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The name of the SSL certificate file.,Ssl_ciphertext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The name of the cipher in use for the SSL connection.,Ssl_keytext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The name of

14、 the SSL key file.,Ssl_verify_server_certtinyint(1) NOT NULL COMMENT Whether to verify the server certificate.,Heartbeatfloat NOT NULL,Bindtext CHARACTER SET utf8 COLLATE utf8_bin COMMENT Displays which interface is employed when connecting to the MySQL server,Ignored_server_idstext CHARACTER SET ut

15、f8 COLLATE utf8_bin COMMENT The number of server IDs to be ignored, followed by the actual server IDs,Uuidtext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The master server uuid.,Retry_countbigint(20) unsigned NOT NULL COMMENT Number of reconnect attempts, to the master, before giving up.,Ssl_crltex

16、t CHARACTER SET utf8 COLLATE utf8_bin COMMENT The file used for the Certificate Revocation List (CRL),Ssl_crlpathtext CHARACTER SET utf8 COLLATE utf8_bin COMMENT The path used for Certificate Revocation List (CRL) files,Enabled_auto_positiontinyint(1) NOT NULL COMMENT Indicates whether GTIDs will be

17、 used to retrieve events from the master.,PRIMARY KEY (Host,Port) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT=Master Information;4.CREATE TABLEslave_relay_log_info(Number_of_linesint(10) unsigned NOT NULL COMMENT Number of lines in the file or rows in the table. Used to version tab

18、le definitions.,Relay_log_nametext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT The name of the current relay log file.,Relay_log_posbigint(20) unsigned NOT NULL COMMENT The relay log position of the last executed event.,Master_log_nametext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMEN

19、T The name of the master binary log file from which the events in the relay log file were read.,Master_log_posbigint(20) unsigned NOT NULL COMMENT The master log position of the last executed event.,Sql_delayint(11) NOT NULL COMMENT The number of seconds that the slave must lag behind the master.,Nu

20、mber_of_workersint(10) unsigned NOT NULL,Idint(10) unsigned NOT NULL COMMENT Internal Id that uniquely identifies this record.,PRIMARY KEY (Id) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT=Relay Log Information;5.CREATE TABLEslave_worker_info(Idint(10) unsigned NOT NULL,Relay_log_nametext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,Relay_log_posbigint(20) unsigned NOT NULL,Master_log_nametext CHARACTER SET utf8

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論