磯部 和広
k-iso****@rozet*****
2012年 6月 8日 (金) 20:18:43 JST
いつもお世話になっております。 ■不具合概要■ http://mroonga.github.com/ja/docs/install.html#centos-5 にて記述されているように、mroongaをアンインストールし 再インストールすると、DBエンジン登録処理が失敗しmroongaが使えなくなる。 ■不具合詳細■ /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " ERROR 1126 (HY000) at line 1: Can't open shared library 'ha_mroonga.so' (errno: 0 API version for STORAGE ENGINE plugin is too different) run the following command to register mroonga: /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " というエラーメッセージが出るが、下記を別途実行しても同じ。 /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " ■追試■ MySQL-server、MySQL-clientもアンインストールしてから やってみましたが、同じ状況でした。 ■前提条件■ memcachedサーバーが動いているのでOS再起動が出来ない状況です。 ■エビデンス■ [root @ PMJ-DB1 ~]# cat /etc/redhat-release CentOS release 5.8 (Final) [root @ PMJ-DB1 ~]# [root @ PMJ-DB1 ~]# rpm -qa | grep -i mysql MySQL-client-5.5.21-1.rhel5 mysql-mroonga-2.00-0 mysql-mroonga-doc-2.00-0 MySQL-server-5.5.21-1.rhel5 [root @ PMJ-DB1 ~]# yum erase mysql-mroonga mysql-mroonga-doc Loaded plugins: fastestmirror Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package mysql-mroonga.x86_64 0:2.00-0 set to be erased ---> Package mysql-mroonga-doc.x86_64 0:2.00-0 set to be erased --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Removing: mysql-mroonga x86_64 2.00-0 installed 1.1 M mysql-mroonga-doc x86_64 2.00-0 installed 1.7 M Transaction Summary ======================================================================================================================================= Remove 2 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : mysql-mroonga 1/2 /usr/bin/mysql -u root -e " DROP FUNCTION last_insert_grn_id; UNINSTALL PLUGIN mroonga; " ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) run the following command to unregister mroonga: /usr/bin/mysql -u root -e " DROP FUNCTION last_insert_grn_id; UNINSTALL PLUGIN mroonga; " Erasing : mysql-mroonga-doc 2/2 Removed: mysql-mroonga.x86_64 0:2.00-0 mysql-mroonga-doc.x86_64 0:2.00-0 Complete! [root @ PMJ-DB1 ~]# sudo rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-0.noarch.rpm http://packages.groonga.org/centos/groonga-release- 1.1.0-0.noarch.rpm を取得中 準備中... ########################################### [100%] 1:groonga-release ########################################### [100%] [root @ PMJ-DB1 ~]# sudo yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp groonga | 951 B 00:00 groonga/primary | 33 kB 00:00 groonga 205/205 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package MySQL-client.x86_64 0:5.5.23-1.rhel5 set to be updated ---> Package MySQL-server.x86_64 0:5.5.23-1.rhel5 set to be updated ---> Package groonga.x86_64 0:2.0.3-0 set to be updated ---> Package groonga-devel.x86_64 0:2.0.3-0 set to be updated ---> Package groonga-doc.x86_64 0:2.0.3-0 set to be updated ---> Package groonga-libs.x86_64 0:2.0.3-0 set to be updated ---> Package groonga-plugin-suggest.x86_64 0:2.0.3-0 set to be updated ---> Package groonga-server.x86_64 0:2.0.3-0 set to be updated ---> Package groonga-tokenizer-mecab.x86_64 0:2.0.3-0 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Installing: MySQL-client x86_64 5.5.23-1.rhel5 groonga 17 M replacing MySQL-client.x86_64 5.5.21-1.rhel5 MySQL-server x86_64 5.5.23-1.rhel5 groonga 52 M replacing MySQL-server.x86_64 5.5.21-1.rhel5 Updating: groonga x86_64 2.0.3-0 groonga 224 k groonga-devel x86_64 2.0.3-0 groonga 30 k groonga-doc x86_64 2.0.3-0 groonga 1.9 M groonga-libs x86_64 2.0.3-0 groonga 2.1 M groonga-plugin-suggest x86_64 2.0.3-0 groonga 43 k groonga-server x86_64 2.0.3-0 groonga 7.8 k groonga-tokenizer-mecab x86_64 2.0.3-0 groonga 17 k Transaction Summary ======================================================================================================================================= Install 2 Package(s) Upgrade 7 Package(s) Total download size: 74 M Is this ok [y/N]: y Downloading Packages: (1/9): groonga-server-2.0.3-0.x86_64.rpm | 7.8 kB 00:00 (2/9): groonga-tokenizer-mecab-2.0.3-0.x86_64.rpm | 17 kB 00:00 (3/9): groonga-devel-2.0.3-0.x86_64.rpm | 30 kB 00:00 (4/9): groonga-plugin-suggest-2.0.3-0.x86_64.rpm | 43 kB 00:00 (5/9): groonga-2.0.3-0.x86_64.rpm | 224 kB 00:00 (6/9): groonga-doc-2.0.3-0.x86_64.rpm | 1.9 MB 00:00 (7/9): groonga-libs-2.0.3-0.x86_64.rpm | 2.1 MB 00:00 (8/9): MySQL-client-5.5.23-1.rhel5.x86_64.rpm | 17 MB 00:01 (9/9): MySQL-server-5.5.23-1.rhel5.x86_64.rpm | 52 MB 00:05 --------------------------------------------------------------------------------------------------------------------------------------- Total 10 MB/s | 74 MB 00:07 警告: rpmts_HdrFromFdno: ヘッダ V4 DSA signature: NOKEY, key ID 45499429 groonga/gpgkey | 1.7 kB 00:00 Importing GPG key 0x45499429 "groonga Key (groonga Official Signing Key) <packa****@groon*****>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-groonga Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Updating : groonga-libs 1/18 Updating : groonga-plugin-suggest 2/18 Updating : groonga-tokenizer-mecab 3/18 Updating : groonga 4/18 Installing : MySQL-client 5/18 Giving mysqld 5 seconds to exit nicely Installing : MySQL-server 6/18 Updating : groonga-doc 7/18 Updating : groonga-server 8/18 Updating : groonga-devel 9/18 Cleanup : MySQL-client 10/18 Cleanup : groonga 11/18 Cleanup : groonga-plugin-suggest 12/18 Cleanup : groonga-tokenizer-mecab 13/18 Cleanup : MySQL-server 14/18 Cleanup : groonga-doc 15/18 Cleanup : groonga-server 16/18 Cleanup : groonga-libs 17/18 Cleanup : groonga-devel 18/18 Installed: MySQL-client.x86_64 0:5.5.23-1.rhel5 MySQL-server.x86_64 0:5.5.23-1.rhel5 Updated: groonga.x86_64 0:2.0.3-0 groonga-devel.x86_64 0:2.0.3-0 groonga-doc.x86_64 0:2.0.3-0 groonga-libs.x86_64 0:2.0.3-0 groonga-plugin-suggest.x86_64 0:2.0.3-0 groonga-server.x86_64 0:2.0.3-0 groonga-tokenizer-mecab.x86_64 0:2.0.3-0 Replaced: MySQL-client.x86_64 0:5.5.21-1.rhel5 MySQL-server.x86_64 0:5.5.21-1.rhel5 Complete! [root @ PMJ-DB1 ~]# sudo yum install -y MySQL-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp Setting up Install Process Package MySQL-server-5.5.23-1.rhel5.x86_64 already installed and latest version Nothing to do [root @ PMJ-DB1 ~]# service mysql start Starting MySQL.. [ OK ] [root @ PMJ-DB1 ~]# yum install -y mysql-mroonga Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package mysql-mroonga.x86_64 0:2.03-0 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Installing: mysql-mroonga x86_64 2.03-0 groonga 526 k Transaction Summary ======================================================================================================================================= Install 1 Package(s) Upgrade 0 Package(s) Total download size: 526 k Downloading Packages: mysql-mroonga-2.03-0.x86_64.rpm | 526 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : mysql-mroonga 1/1 /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " ERROR 1126 (HY000) at line 1: Can't open shared library 'ha_mroonga.so' (errno: 0 API version for STORAGE ENGINE plugin is too different) run the following command to register mroonga: /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " Installed: mysql-mroonga.x86_64 0:2.03-0 Complete! [root @ PMJ-DB1 ~]# ■追試エビデンス■ [root @ PMJ-DB1 ~]# rpm -qa | grep -i mysql MySQL-client-5.5.23-1.rhel5 MySQL-server-5.5.23-1.rhel5 mysql-mroonga-2.03-0 [root @ PMJ-DB1 ~]# yum -y erase 'MySQL-*' 'mysql' Loaded plugins: fastestmirror Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package MySQL-client.x86_64 0:5.5.23-1.rhel5 set to be erased --> Processing Dependency: MySQL-client = 5.5.24-1 for package: mysql-mroonga ---> Package MySQL-server.x86_64 0:5.5.23-1.rhel5 set to be erased --> Running transaction check ---> Package mysql-mroonga.x86_64 0:2.03-0 set to be erased --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Removing: MySQL-client x86_64 5.5.23-1.rhel5 installed 59 M MySQL-server x86_64 5.5.23-1.rhel5 installed 156 M Removing for dependencies: mysql-mroonga x86_64 2.03-0 installed 1.3 M Transaction Summary ======================================================================================================================================= Remove 3 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : MySQL-client 1/3 /usr/bin/mysql -u root -e " DROP FUNCTION last_insert_grn_id; UNINSTALL PLUGIN mroonga; FLUSH TABLES; " /var/tmp/rpm-tmp.53532: line 9: /usr/bin/mysql: そのようなファイルやディ レクトリはありません run the following command to unregister mroonga: /usr/bin/mysql -u root -e " DROP FUNCTION last_insert_grn_id; UNINSTALL PLUGIN mroonga; FLUSH TABLES; " Erasing : mysql-mroonga 2/3 Erasing : MySQL-server 3/3 Removed: MySQL-client.x86_64 0:5.5.23-1.rhel5 MySQL-server.x86_64 0:5.5.23-1.rhel5 Dependency Removed: mysql-mroonga.x86_64 0:2.03-0 Complete! [root @ PMJ-DB1 ~]# rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-0.noarch.rpm http://packages.groonga.org/centos/groonga-release- 1.1.0-0.noarch.rpm を取得中 準備中... ########################################### [100%] パッケージ groonga-release-1.1.0-0.noarch は既にインストールされています。 [root @ PMJ-DB1 ~]# yum update -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp base | 1.1 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 Setting up Update Process No Packages marked for Update [root @ PMJ-DB1 ~]# yum install -y MySQL-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package MySQL-server.x86_64 0:5.5.23-1.rhel5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Installing: MySQL-server x86_64 5.5.23-1.rhel5 groonga 52 M Transaction Summary ======================================================================================================================================= Install 1 Package(s) Upgrade 0 Package(s) Total download size: 52 M Downloading Packages: MySQL-server-5.5.23-1.rhel5.x86_64.rpm | 52 MB 00:04 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : MySQL-server 1/1 Installed: MySQL-server.x86_64 0:5.5.23-1.rhel5 Complete! [root @ PMJ-DB1 ~]# service mysql start Starting MySQL.. [ OK ] [root @ PMJ-DB1 ~]# yum install -y mysql-mroonga Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package mysql-mroonga.x86_64 0:2.03-0 set to be updated --> Processing Dependency: MySQL-client = 5.5.24-1 for package: mysql-mroonga --> Running transaction check ---> Package MySQL-client.x86_64 0:5.5.23-1.rhel5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Installing: mysql-mroonga x86_64 2.03-0 groonga 526 k Installing for dependencies: MySQL-client x86_64 5.5.23-1.rhel5 groonga 17 M Transaction Summary ======================================================================================================================================= Install 2 Package(s) Upgrade 0 Package(s) Total download size: 18 M Downloading Packages: (1/2): mysql-mroonga-2.03-0.x86_64.rpm | 526 kB 00:00 (2/2): MySQL-client-5.5.23-1.rhel5.x86_64.rpm | 17 MB 00:01 --------------------------------------------------------------------------------------------------------------------------------------- Total 10 MB/s | 18 MB 00:01 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : MySQL-client 1/2 Installing : mysql-mroonga 2/2 /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " ERROR 1126 (HY000) at line 1: Can't open shared library 'ha_mroonga.so' (errno: 0 API version for STORAGE ENGINE plugin is too different) run the following command to register mroonga: /usr/bin/mysql -u root -e " INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; " Installed: mysql-mroonga.x86_64 0:2.03-0 Dependency Installed: MySQL-client.x86_64 0:5.5.23-1.rhel5 Complete! [root @ PMJ-DB1 ~]# /usr/bin/mysql -u root -e " > INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; > CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; > " ERROR 1126 (HY000) at line 2: Can't open shared library 'ha_mroonga.so' (errno: 0 API version for STORAGE ENGINE plugin is too different) [root @ PMJ-DB1 ~]# which mysql /usr/bin/mysql [root @ PMJ-DB1 ~]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.5.23-log MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; ERROR 1126 (HY000): Can't open shared library 'ha_mroonga.so' (errno: 0 API version for STORAGE ENGINE plugin is too different) mysql> exit; Bye [root @ PMJ-DB1 ~]# cat /etc/ld.so.conf include ld.so.conf.d/*.conf /usr/local/lib [root @ PMJ-DB1 ~]# ldconfig [root @ PMJ-DB1 ~]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.5.23-log MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; ERROR 1126 (HY000): Can't open shared library 'ha_mroonga.so' (errno: 0 API version for STORAGE ENGINE plugin is too different) mysql> exit; Bye [root @ PMJ-DB1 ~]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.5.23-log MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show engines; +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MyISAM | DEFAULT | MyISAM storage engine | NO | NO | NO | | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | | ARCHIVE | YES | Archive storage engine | NO | NO | NO | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ 9 rows in set (0.00 sec) mysql> exit Bye [root @ PMJ-DB1 ~]#