ERROR 1123 (HY000): Can't initialize function 'group_replication'; Plugin initialization function fa

本文主要是介绍ERROR 1123 (HY000): Can't initialize function 'group_replication'; Plugin initialization function fa,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

MySQL Group Replication安装group_replication.so报错

mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so';
ERROR 1123 (HY000): Can't initialize function 'group_replication'; Plugin initialization function failed.

mysql版本5.7.24,支持Group Replication功能,plugin目录中存在"group_replication.so"文件

[root@node1 logs]# ls -rtlh /app/mysql5.7/lib/plugin/ | grep group*
-rwxr-xr-x. 1 mysql mysql  21M May 17 16:06 group_replication.so

查看日志node.err

2019-05-21T08:39:24.050325Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-05-21T08:39:24.050480Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2019-05-21T08:39:24.050545Z 0 [Note] /app/mysql5.7/bin/mysqld (mysqld 5.7.24) starting as process 11564 ...
2019-05-21T08:39:24.108727Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-05-21T08:39:24.108774Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-21T08:39:24.108782Z 0 [Note] InnoDB: Uses event mutexes
2019-05-21T08:39:24.108789Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-05-21T08:39:24.108796Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-05-21T08:39:24.108803Z 0 [Note] InnoDB: Using Linux native AIO
2019-05-21T08:39:24.109331Z 0 [Note] InnoDB: Number of pools: 1
2019-05-21T08:39:24.109540Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-05-21T08:39:24.112278Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2019-05-21T08:39:24.168366Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-05-21T08:39:24.178496Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-05-21T08:39:24.209811Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-21T08:39:24.269905Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-05-21T08:39:24.269987Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-05-21T08:39:24.325815Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-05-21T08:39:24.326728Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-05-21T08:39:24.326745Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-05-21T08:39:24.327934Z 0 [Note] InnoDB: 5.7.24 started; log sequence number 2591468
2019-05-21T08:39:24.328131Z 0 [Note] InnoDB: Loading buffer pool(s) from /app/mysql5.7/data/ib_buffer_pool
2019-05-21T08:39:24.328387Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-05-21T08:39:24.354922Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-05-21T08:39:24.354946Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-05-21T08:39:24.355008Z 0 [Note] IPv6 is available.
2019-05-21T08:39:24.355029Z 0 [Note]   - '::' resolves to '::';
2019-05-21T08:39:24.355063Z 0 [Note] Server socket created on IP: '::'.
2019-05-21T08:39:24.377232Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.377288Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.377303Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.377539Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.377551Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.377769Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.449899Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.449926Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-05-21T08:39:24.456587Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190521 16:39:24
2019-05-21T08:39:24.456616Z 0 [Note] Failed to start slave threads for channel ''
2019-05-21T08:39:24.502029Z 0 [Note] Event Scheduler: Loaded 0 events
2019-05-21T08:39:24.504720Z 0 [Note] /app/mysql5.7/bin/mysqld: ready for connections.
Version: '5.7.24'  socket: '/app/mysql5.7/tmp/mysql.sock'  port: 3306  Source distribution
2019-05-22T00:23:31.539765Z 3 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.539846Z 3 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.539874Z 3 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.539922Z 3 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.539939Z 3 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.540438Z 3 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.540521Z 3 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:23:31.540544Z 3 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-05-22T00:24:04.337450Z 3 [ERROR] For the creation of replication channels the master info and relay log info repositories must be set to TABLE
2019-05-22T00:24:04.337517Z 3 [ERROR] Plugin group_replication reported: 'Failure during Group Replication handler initialization'
2019-05-22T00:24:04.337529Z 3 [ERROR] Plugin 'group_replication' init function returned error.
2019-05-22T00:24:04.337559Z 3 [Note] Shutting down plugin 'group_replication'
2019-05-22T00:24:04.337591Z 3 [ERROR] Plugin group_replication reported: 'Failure when unregistering the server state observers'
2019-05-22T00:24:04.337608Z 3 [ERROR] Plugin group_replication reported: 'Failure when unregistering the transactions state observers'
2019-05-22T00:24:04.337615Z 3 [ERROR] Plugin group_replication reported: 'Failure when unregistering the binlog state observers'
2019-05-22T00:32:25.164673Z 3 [ERROR] Slave: Cannot create new master info structure when repositories are of type FILE. Convert slave repositories  to TABLE to replicate from multiple sources.
2019-05-22T00:37:43.690841Z 4 [ERROR] For the creation of replication channels the master info and relay log info repositories must be set to TABLE
2019-05-22T00:37:43.690918Z 4 [ERROR] Plugin group_replication reported: 'Failure during Group Replication handler initialization'
2019-05-22T00:37:43.690927Z 4 [ERROR] Plugin 'group_replication' init function returned error.
2019-05-22T00:37:43.690948Z 4 [Note] Shutting down plugin 'group_replication'
2019-05-22T00:37:43.690970Z 4 [ERROR] Plugin group_replication reported: 'Failure when unregistering the server state observers'
2019-05-22T00:37:43.690978Z 4 [ERROR] Plugin group_replication reported: 'Failure when unregistering the transactions state observers'
2019-05-22T00:37:43.690984Z 4 [ERROR] Plugin group_replication reported: 'Failure when unregistering the binlog state observers'

分析日志中的"warning&ERROR",其中大量的'user' entry 'root@localhost' ignored in --skip-name-resolve mode.引起了关注。

这条warning是由于my.cnf中配置了“skip-name-resolve”,目的是不再进行反解析(ip不反解成域名),这样可以加快数据库的反应时间。启用后,在mysql的授权表中就不能使用主机名了,只能使用IP ,出现此警告是由于mysql.user表中已经存在有相关的帐号信息。

mysql> select user,host from mysql.user;
+---------------+-----------+
| user          | host      |
+---------------+-----------+
| rep           | 10.6.0.%  |
| mysql.session | localhost |
| mysql.sys     | localhost |
| root          | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)

这样问题就明了啦!启用了“skip-name-resolve”参数后,mysql.session@localhost就失效了。但组复制插件安装的必要条件是创建mysql.session用户。参考《MySQL 5.7 Reference Manual --- 17.2.1.4 Launching Group Replication》

解决方案:

        注释掉my.cnf中的 “skip-name-resolve”参数。

日志输出

2019-05-22T00:52:03.845506Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-05-22T00:52:03.845632Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2019-05-22T00:52:03.845696Z 0 [Note] /app/mysql5.7/bin/mysqld (mysqld 5.7.24-log) starting as process 31206 ...
2019-05-22T00:52:03.853580Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-05-22T00:52:03.853640Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-22T00:52:03.853650Z 0 [Note] InnoDB: Uses event mutexes
2019-05-22T00:52:03.853657Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-05-22T00:52:03.853665Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-05-22T00:52:03.853672Z 0 [Note] InnoDB: Using Linux native AIO
2019-05-22T00:52:03.854174Z 0 [Note] InnoDB: Number of pools: 1
2019-05-22T00:52:03.854373Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-05-22T00:52:03.856599Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2019-05-22T00:52:03.898026Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-05-22T00:52:03.905625Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-05-22T00:52:03.917632Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-22T00:52:03.943583Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-05-22T00:52:03.943667Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-05-22T00:52:03.990381Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-05-22T00:52:03.991310Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-05-22T00:52:03.991334Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-05-22T00:52:03.992117Z 0 [Note] InnoDB: Waiting for purge to start
2019-05-22T00:52:04.042544Z 0 [Note] InnoDB: 5.7.24 started; log sequence number 2591600
2019-05-22T00:52:04.042689Z 0 [Note] InnoDB: Loading buffer pool(s) from /app/mysql5.7/data/ib_buffer_pool
2019-05-22T00:52:04.043284Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-05-22T00:52:04.044510Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190522  8:52:04
2019-05-22T00:52:04.044851Z 0 [Warning] unknown variable 'loose-group_replication_group_name=fd434dd6-7ba3-11e9-af87-000c29346684'
2019-05-22T00:52:04.044876Z 0 [Warning] unknown variable 'loose-group_replication_start_on_boot=OFF'
2019-05-22T00:52:04.044883Z 0 [Warning] unknown variable 'loose-group_replication_local_address=10.6.0.137:20001'
2019-05-22T00:52:04.044889Z 0 [Warning] unknown variable 'loose-group_replication_group_seeds=10.6.0.137:20001,10.6.0.138:20002,10.6.0.139:20003'
2019-05-22T00:52:04.044895Z 0 [Warning] unknown variable 'loose-group_replication_bootstrap_group=OFF'
2019-05-22T00:52:04.044910Z 0 [Warning] unknown variable 'loose-group_replication_enforce_update_everywhere_checks=OFF'
2019-05-22T00:52:04.069579Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-05-22T00:52:04.069606Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-05-22T00:52:04.069665Z 0 [Note] IPv6 is available.
2019-05-22T00:52:04.069684Z 0 [Note]   - '::' resolves to '::';
2019-05-22T00:52:04.069706Z 0 [Note] Server socket created on IP: '::'.
2019-05-22T00:52:04.074463Z 0 [Note] Failed to start slave threads for channel ''
2019-05-22T00:52:04.082748Z 0 [Note] Event Scheduler: Loaded 0 events
2019-05-22T00:52:04.082943Z 0 [Note] /app/mysql5.7/bin/mysqld: ready for connections.
Version: '5.7.24-log'  socket: '/app/mysql5.7/tmp/mysql.sock'  port: 3306  Source distribution

再次安装group_replication.so,

mysql> install plugin group_replication soname 'group_replication.so';
Query OK, 0 rows affected (0.01 sec)
mysql> show plugins;
+----------------------------+----------+--------------------+----------------------+---------+
| Name                       | Status   | Type               | Library              | License |
+----------------------------+----------+--------------------+----------------------+---------+
| binlog                     | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |......   略去输出信息| group_replication          | ACTIVE   | GROUP REPLICATION  | group_replication.so | GPL     |
+----------------------------+----------+--------------------+----------------------+---------+
45 rows in set (0.00 sec)

 

这篇关于ERROR 1123 (HY000): Can't initialize function 'group_replication'; Plugin initialization function fa的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/301666

相关文章

mysql中的group by高级用法

《mysql中的groupby高级用法》MySQL中的GROUPBY是数据聚合分析的核心功能,主要用于将结果集按指定列分组,并结合聚合函数进行统计计算,下面给大家介绍mysql中的groupby用法... 目录一、基本语法与核心功能二、基础用法示例1. 单列分组统计2. 多列组合分组3. 与WHERE结合使

mysql出现ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost‘ (10061)的解决方法

《mysql出现ERROR2003(HY000):Can‘tconnecttoMySQLserveron‘localhost‘(10061)的解决方法》本文主要介绍了mysql出现... 目录前言:第一步:第二步:第三步:总结:前言:当你想通过命令窗口想打开mysql时候发现提http://www.cpp

Maven pom.xml文件中build,plugin标签的使用小结

《Mavenpom.xml文件中build,plugin标签的使用小结》本文主要介绍了Mavenpom.xml文件中build,plugin标签的使用小结,文中通过示例代码介绍的非常详细,对大家的学... 目录<build> 标签Plugins插件<build> 标签<build> 标签是 pom.XML

MySQL报错sql_mode=only_full_group_by的问题解决

《MySQL报错sql_mode=only_full_group_by的问题解决》本文主要介绍了MySQL报错sql_mode=only_full_group_by的问题解决,文中通过示例代码介绍的非... 目录报错信息DataGrip 报错还原Navicat 报错还原报错原因解决方案查看当前 sql mo

Java function函数式接口的使用方法与实例

《Javafunction函数式接口的使用方法与实例》:本文主要介绍Javafunction函数式接口的使用方法与实例,函数式接口如一支未完成的诗篇,用Lambda表达式作韵脚,将代码的机械美感... 目录引言-当代码遇见诗性一、函数式接口的生物学解构1.1 函数式接口的基因密码1.2 六大核心接口的形态学

C++11的函数包装器std::function使用示例

《C++11的函数包装器std::function使用示例》C++11引入的std::function是最常用的函数包装器,它可以存储任何可调用对象并提供统一的调用接口,以下是关于函数包装器的详细讲解... 目录一、std::function 的基本用法1. 基本语法二、如何使用 std::function

matlab读取NC文件(含group)

matlab读取NC文件(含group): NC文件数据结构: 代码: % 打开 NetCDF 文件filename = 'your_file.nc'; % 替换为你的文件名% 使用 netcdf.open 函数打开文件ncid = netcdf.open(filename, 'NC_NOWRITE');% 查看文件中的组% 假设我们想读取名为 "group1" 的组groupName

AutoGen Function Call 函数调用解析(一)

目录 一、AutoGen Function Call 1.1 register_for_llm 注册调用 1.2 register_for_execution 注册执行 1.3 三种注册方法 1.3.1 函数定义和注册分开 1.3.2 定义函数时注册 1.3.3  register_function 函数注册 二、实例 本文主要对 AutoGen Function Call

类的load方法和initialize方法对比

1. load方法在main()之前被调用,而initialize方法在main()之后调用 load方法实际是在load_images过程中被调用的。load_images会将当前应用依赖的所有镜像(动态库)加载到内存,在在加载中首先是对镜像进行扫描,将所有包含 load 方法的类加入列表 loadable_classes ,然后从这个列表中逐一调用其所包含的 load 方法。 +[XXCl

python实现萤火虫算法(FA)

博客目录 引言 什么是萤火虫算法(Firefly Algorithm, FA)?FA算法的应用场景为什么使用FA算法? FA算法的原理 萤火虫算法的基本概念FA算法的步骤萤火虫亮度与吸引力FA算法的流程 FA算法的实现步骤 初始化萤火虫个体计算亮度与吸引力更新位置 Python实现FA算法 面向对象思想设计代码实现示例与解释 FA算法应用实例:函数优化问题 场景描述算法实现结果分析与可