MySQL5.7叢集(MGR)啟動報ERROR 3092 (HY000)
MySQL5.7版本MGR啟動時報:
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log.
檢視告警日誌:
2020-03-04T07:48:58.797180Z 574478 [Warning] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'2020-03-04T07:48:58.844857Z 574714 [ERROR] Slave SQL for channel 'group_replication_applier': Error 'This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its d eclaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)' on query. Default database: ''. Query: 'CREATE DEFINER=`root`@`192.168.187.%` FUNCTION `GetDistance`(`lat1` float,`lng1` float,`lat2` float,`lng2` float) RETURNS floatbegin DECLARE earth_padius float DEFAULT 6378.137; DECLARE radLat1 float DEFAULT 0; DECLARE radLat2 float DEFAULT 0; DECLARE a float DEFAULT 0; DECLARE b float DEFAULT 0; DECLARE s float DEFAULT 0; set radLat1 = Radian(lat1); set radLat2 = Radian(lat2); set a = radLat1 - radLat2; set b = Radian(lng1) - Radian(lng2); set s = 2 * Asin(Sqrt(power(sin(a / 2), 2) + cos(radLat1) * cos(radLat2) * power(sin(b / 2), 2))); set s = s * earth_padius; set s = Round(s * 10000) / 10000; re 2020-03-04T07:48:58.844919Z 574714 [Warning] Slave: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *mi ght* want to use the less safe log_bin_trust_function_creators variable) Error_code: 14182020-03-04T07:48:58.844938Z 574714 [ERROR] Plugin group_replication reported: 'The applier thread execution was aborted. Unable to process more transactions, this member will n ow leave the group.'2020-03-04T07:48:58.844963Z 574714 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at lo g 'FIRST' position 0.2020-03-04T07:48:58.844984Z 574711 [ERROR] Plugin group_replication reported: 'Fatal error during execution on the Applier process of Group Replication. The server will now lea ve the group.'2020-03-04T07:48:58.845030Z 574711 [ERROR] Plugin group_replication reported: '[GCS] The member is already leaving or joining a group.' 2020-03-04T07:48:58.845073Z 574711 [ERROR] Plugin group_replication reported: 'Unable to confirm whether the server has left the group or not. Check performance_schema.replicat ion_group_members to check group membership information.'2020-03-04T07:49:03.586818Z 0 [ERROR] Plugin group_replication reported: 'There was a previous plugin error while the member joined the group. The member will now exit the grou p.'2020-03-04T07:57:00.047106Z 574478 [Warning] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'2020-03-04T07:57:01.992027Z 575211 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Pleas e consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
從監控告警日誌內容可以看出來,是由於函式操作不符合規範造成的MGR叢集掉線,具體日誌描述如下:
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *mi
ght* want to use the less safe log_bin_trust_function_creators variable) Error_code: 1418
遇到這種問題可以從兩個方面去解決。第一種方法就是開發人員按照規範建立符合標準的函式;第二種方法就是配置資料庫引數,將log_bin_trust_function_creators配置為開啟。
此處,開發人員也是選擇了將log_bin_trust_function_creators引數配置為開啟,但是在一個節點開啟了,其他節點未開啟,最終導致其他節點出現上述錯誤資訊。
以下是部分處理過程,僅供參考:
mysql> select * from performance_schema.replication_group_members; +---------------------------+--------------------------------------+-------------+-------------+--------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +---------------------------+--------------------------------------+-------------+-------------+--------------+ | group_replication_applier | 48713421-9261-11e9-9799-005056851cf9 | db2 | 3306 | ERROR | +---------------------------+--------------------------------------+-------------+-------------+--------------+ 1 row in set (0.00 sec) mysql> mysql> mysql> mysql> stop group_replication; Query OK, 0 rows affected (1.01 sec) mysql> start group_replication; ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. mysql> show variables like '%func%'; +---------------------------------+-------+ | Variable_name | Value | +---------------------------------+-------+ | log_bin_trust_function_creators | OFF | +---------------------------------+-------+ 1 row in set (0.01 sec) mysql> mysql> mysql> set global log_bin_trust_function_creators=1; Query OK, 0 rows affected (0.00 sec) mysql> show variables like '%func%'; +---------------------------------+-------+ | Variable_name | Value | +---------------------------------+-------+ | log_bin_trust_function_creators | ON | +---------------------------------+-------+ 1 row in set (0.00 sec) mysql> mysql> mysql> stop group_replication; Query OK, 0 rows affected (0.00 sec) mysql> start group_replication; Query OK, 0 rows affected (2.90 sec) mysql> select * from performance_schema.replication_group_members; +---------------------------+--------------------------------------+-------------+-------------+--------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +---------------------------+--------------------------------------+-------------+-------------+--------------+ | group_replication_applier | 2ff8ea98-9128-11e9-91dd-0819a62578bd | db1 | 3306 | ONLINE | | group_replication_applier | 48713421-9261-11e9-9799-005056851cf9 | db2 | 3306 | ONLINE | | group_replication_applier | 9c245a8c-9262-11e9-82d6-005056853a0e | db3 | 3306 | ONLINE | +---------------------------+--------------------------------------+-------------+-------------+--------------+ 3 rows in set (0.00 sec) mysql>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31403259/viewspace-2679199/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL MGR 叢集搭建MySql
- MySQL MGR 叢集搭建(單主模式)MySql模式
- RabbitMQ叢集重啟報錯MQ
- hadoop叢集配置和啟動Hadoop
- Oracle叢集技術 | 叢集的自啟動系列(一)Oracle
- ERROR 2026 (HY000): SSL connection error: unknown error numberError
- storm叢集啟動停止指令碼ORM指令碼
- Hadoop叢集初始化啟動Hadoop
- ERROR 1114 (HY000) The table '' is fullError
- Hadoop叢集環境啟動順序Hadoop
- Oracle 12c叢集啟動故障Oracle
- 阿里雲mysql遠端登入報ERROR 2027(HY000)阿里MySqlError
- MySQL 報錯 ERROR 1290 (HY000): running with the --secure-file-privMySqlError
- Error!: SQLSTATE[HY000] [2002] Connection refusedErrorSQL
- ERROR 1290 (HY000): The MySQL server is running withErrorMySqlServer
- 【Linux+Python】叢集、ssh、python、import errorLinuxPythonImportError
- 【MySQL】ERROR 1290 (HY000): --secure-file-priv--匯出報錯MySqlError
- MySQL報錯ERROR 2013 (HY000): Lost connection to MySQL server during queryMySqlErrorServer
- 沃趣微講堂 | PXC、MGC&MGR原理與實踐對比(七):MGR叢集初始化GC
- MySQL 啟動報錯 error while loading shared librariesMySqlErrorWhile
- ElasticSearch啟動報錯 ERROR: [4] bootstrap checks failedElasticsearchErrorbootAI
- mysql 5.6.25報錯ERROR 1372 (HY000): Password hash 的一點思考MySqlError
- ERROR 1290 (HY000) 解決辦法Error
- redis叢集報錯Redis
- 解決ERROR 1030 (HY000): Got error 168 from storage engine apparmorErrorGoAPP
- 沃趣微講堂 | Oracle叢集技術(三):被誤傳的叢集自啟動Oracle
- Centos7-mysql執行報錯ERROR1820(HY000):YoumustresetyourpasswordusingALTERUSERstatementbeforeexecutingthisstatement.CentOSMySqlError
- Mysql連線錯誤ERROR 2003 (HY000)MySqlError
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- Solaris叢集節點重啟
- Tomcat啟動報錯:Error starting static Resources解決方法TomcatError
- 大資料分享Spark任務和叢集啟動流程大資料Spark
- Oracle 叢集的自啟動,OLR與套接字檔案Oracle
- Nuxt3+PM2叢集模式啟動及勘誤UX模式
- idea配置dashboard並原始碼啟動叢集執行nacosIdea原始碼
- 【MySQL】ERROR 1878 (HY000): Temporary file write failure.MySqlErrorAI
- mysql 8 報錯 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositoryMySqlErrorAIStruct
- 解決docker啟動映象報錯:docker: Error response from daemonDockerError