MySQL報錯Slave: received end packet from server, apparent master shutdown
MySQL 一臺從庫的錯誤日誌,大量報下面的錯誤資訊
2018-11-16 15:11:12 10951 [Note] Slave: received end packet from server, apparent master shutdown: 2018-11-16 15:11:12 10951 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 255843250 2018-11-16 15:11:12 10951 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-11-16 15:20:09 10951 [Note] Slave: received end packet from server, apparent master shutdown: 2018-11-16 15:20:09 10951 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 276447773 2018-11-16 15:20:09 10951 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
這套DB有三臺從庫,而主庫上面透過命令只能看到兩臺從庫
root [(none)]> show slave hosts; +-----------+------+------+-----------+--------------------------------------+ | Server_id | Host | Port | Master_id | Slave_UUID | +-----------+------+------+-----------+--------------------------------------+ | 1373324 | | 3324 | 174144 | 5dfa3e4b-df15-11e8-8c37-06cbe47ccefb | | 174192 | | 3306 | 174144 | b24e27f0-dce5-11e8-bdf4-0cc47a397e1c | +-----------+------+------+-----------+--------------------------------------+ 2 rows in set (0.00 sec)
到缺少的那臺從庫上面檢查server-id,看有沒有和其他從庫相同
server-id並不相同
mysql> show global variables like 'server%id%'; +----------------+--------------------------------------+ | Variable_name | Value | +----------------+--------------------------------------+ | server_id | 2461620 | | server_id_bits | 32 | | server_uuid | b24e27f0-dce5-11e8-bdf4-0cc47a397e1c | +----------------+--------------------------------------+ 3 rows in set (0.00 sec)
排除了server-id,還有可能是DB的uuid相同而導致從資料庫註冊不到主庫。
刪除資料庫目錄下面的server-id檔案
# cd /disk1/mysql3320 # cat auto.cnf [auto] server-uuid=11478f92-e973-11e8-8fcf-0cc47a663554 # rm auto.cnf
之後重啟問題從庫,報錯消失。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2220426/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- The last packet successfully received from the server was 2,625 milliseconds ago.ASTServerGo
- 故障案例:主從同步報錯Fatal error: The slave I/O thread stops because master and slave have equal MySQL server主從同步ErrorthreadASTMySqlServer
- The slave I/O thread stops because master and slave have equal MySQL server UUIDthreadASTMySqlServerUI
- MySQL主從複製報錯:Got fatal error 1236 from master when reading data fromMySqlGoErrorAST
- MYSQL The Server Shutdown Process(筆記)MySqlServer筆記
- mysql 8 報錯 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositoryMySqlErrorAIStruct
- Mysql 5.6 Master和Slave 主備切換MySqlAST
- Lost connection to MySQL server at 'reading authorization packet'MySqlServer
- MySQL報錯:Packets larger than max_allowed_packet are not allMySql
- Unknown initial character set index ‘255‘ received from server. Initial client character set can beIndexServerclient
- Mysql Master-slave複製簡單配置記錄MySqlAST
- 踩坑:在 Laravel 中使用 Swoole server 服務呼叫資料庫模型,MySQL 頻繁出錯 Packets out of order. Expected 1 received 111. Packet sizeLaravelServer資料庫模型MySql
- Mysqldump實現mysql的master-slave主從複製MySqlAST
- mysql slave 跟進 master 的關鍵狀態指標MySqlAST指標
- where to start, from where the end
- tomcat新增專案報錯:There are no resources that can be added or removed from the serverTomcatREMServer
- DocumentDB 報錯“not master”AST
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- Setup MariaDB Master/Slave Replication for Docker MariaDBASTDocker
- Innobackupex實現mysql線上搭建master-slave主從複製MySqlAST
- cURL error 52: Empty reply from server GitHub 三方登入報錯ErrorServerGithub
- 【maven】Maven報錯 zip END header not foundMavenHeader
- MySQL複製跳過錯誤--slave_skip_errors、sql_slave_skip_counter、slave_exec_modeMySqlError
- Leetcode 19 Remove Nth Node From End of ListLeetCodeREM
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- MySQL案例09:Last_IO_Error: Got fatal error 1236 from master when reading data from binary logMySqlASTErrorGo
- git - git push origin master 報錯GitAST
- MySQL啟動報錯:The server quit without updating PID fileMySqlServerUI
- SQL Server CASE WHEN ... THEN ... ELSE ... ENDSQLServer
- Renaming the default branch from master to main on GithubASTAIGithub
- 資料庫讀寫分離Master-Slave資料庫AST
- MySQL報錯ERROR 2013 (HY000): Lost connection to MySQL server during queryMySqlErrorServer
- 解決MySql報錯:1130 - Host ‘xxx‘ is not allowed to connect to this MySQL server的方法MySqlServer
- MySQL 5.7從庫報錯exceeds of slave_pending_jobs_size_max. Error_code: 1864MySqlError
- MySQL Insert資料量過大導致報錯 MySQL server has gone awayMySqlServerGo
- 安裝MySQL5.7報錯:The action ‘Install’ for product ‘MySQL Server 5.7.19’ failed.MySqlServerAI
- [Javascript] Find Items from the end of the JavaScript Array using at, findLast and findLastIndexJavaScriptASTIndex
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer