DBD::mysql::dr::imp_data_size unexpectedly错误解决
最近的MHA验证时,遭遇了DBD::mysql::dr::imp_data_size unexpectedly这个错误。而DBD这个包已经是安装过了的。下面是这个问题的
最近的MHA验证时,遭遇了DBD::mysql::dr::imp_data_size unexpectedly这个错误。而DBD这个包已经是安装过了的。下面是这个问题的描述和解决方案。
1、故障描述
# masterha_check_repl --conf=/etc/app1.cnf
Mon Feb 16 19:56:29 2015 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Mon Feb 16 19:56:29 2015 - [info] Reading application default configuration from /etc/app1.cnf..
Mon Feb 16 19:56:29 2015 - [info] Reading server configuration from /etc/app1.cnf..
Mon Feb 16 19:56:29 2015 - [info] MHA::MasterMonitor version 0.56.
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 140.
at /usr/lib/perl5/site_perl/5.8.8/MHA/Server.pm line 166
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 140.
at /usr/lib/perl5/site_perl/5.8.8/MHA/Server.pm line 166
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 140.
at /usr/lib/perl5/site_perl/5.8.8/MHA/Server.pm line 166
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Got fatal error, stopping operations
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln520] Error happened on checking configurations. at /usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm line 326
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln691] Error happened on monitoring servers.
Mon Feb 16 19:56:29 2015 - [info] Got exit code 1 (Not master dead).
MySQL Replication Health is NOT OK!
2、故障解决
###查看当前系统的dbi与dbd包,,如下表明2个包都已安装
# rpm -qa|grep -i dbi
perl-DBI-1.52-2.el5
# rpm -qa|grep -i dbd
perl-DBD-Pg-1.49-4.el5_8
perl-DBD-MySQL-3.0007-2.el5
###我们首先卸载这2个rpm包
# rpm -e --nodeps perl-DBI-1.52-2.el5
# rpm -e --nodeps perl-DBD-MySQL-3.0007-2.el5
###下面使用yum方式分别安装这2个包
# yum install perl-DBI
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.cug.edu.cn
* epel: mirrors.ustc.edu.cn
* extras: mirrors.hust.edu.cn
* updates: mirrors.hust.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBI.x86_64 0:1.52-2.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================
Package Arch Version Repository Size
===================================================================================================
Installing:
perl-DBI x86_64 1.52-2.el5 base 600 k
Transaction Summary
===================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 600 k
Is this ok [y/N]: y
Downloading Packages:
perl-DBI-1.52-2.el5.x86_64.rpm | 600 kB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : perl-DBI 1/1

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.
