In the previous article "Configuring MySQL Mmm from scratch", install and configure mysql-Mmm in 64-bit rhel6. In the past two days, I got a 32-bit centos 5, and encountered some other problems during the configuration process.
I. dependency problems
Because mysql-Mmm cannot be directly installed through yum in this environment, you can only install mysql-Mmm by downloading the installation file. Before installing Mmm, you must install the library files on which Mmm depends. For convenience, monitor and Database Host are not treated differently. All dependencies are installed in a unified manner.
First, install Perl and its library files:
# yum -y install perl*
Because the dependency problem has been plagued, so this time all the brain is installed. However, it is too easy to think about, and the system still prompts that it cannot be found at startup.Proc: DaemonOr log: log4perl. After searching for a long time, I finally collected all dependencies and wrote the following installation files:
# Clear all previous downlowdsrm -rf mmm_deps# Create a new folder for downlowdsmkdir mmm_depscd mmm_deps# download all moduleswget http://download.fedora.redhat.com/pub/epel/5/i386/rrdtool-1.2.27-3.el5.i386.rpmwget http://download.fedora.redhat.com/pub/epel/5/i386/rrdtool-perl-1.2.27-3.el5.i386.rpmwget http://mirror.centos.org/centos/5/os/i386/CentOS/libart_lgpl-2.3.17-4.i386.rpmwget http://mirror.centos.org/centos/5/updates/i386/RPMS/freetype-2.2.1-28.el5_7.2.i386.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Proc-Daemon-0.03-1.2.el5.rf.noarch.rpmwget http://download.fedora.redhat.com/pub/epel/5/i386/perl-XML-DOM-1.44-2.el5.noarch.rpmwget http://download.fedora.redhat.com/pub/epel/5/i386/perl-XML-RegExp-0.03-2.el5.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Log-Log4perl-RRDs-1.13-1.el5.rf.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Log-Log4perl-1.13-1.el5.rf.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-IPC-Shareable-0.60-1.2.el5.rf.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Log-Dispatch-2.26-1.el5.rf.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Params-Validate-0.95-1.el5.rf.i386.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Log-Dispatch-FileRotate-1.19-1.el5.rf.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Algorithm-Diff-1.1902-1.el5.rf.noarch.rpmwget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Net-ARP-1.0.6-1.el5.rf.i386.rpm# install all modulesrpm -Uvh freetype-2.2.1-28.el5_7.2.i386.rpmrpm -Uvh perl-Params-Validate-0.95-1.el5.rf.i386.rpmrpm -Uvh libart_lgpl-2.3.17-4.i386.rpmrpm -Uvh rrdtool-1.2.27-3.el5.i386.rpmrpm -Uvh rrdtool-perl-1.2.27-3.el5.i386.rpmrpm -Uvh perl-Algorithm-Diff-1.1902-1.el5.rf.noarch.rpmrpm -Uvh perl-Log-Dispatch-2.26-1.el5.rf.noarch.rpmrpm -Uvh perl-Log-Dispatch-FileRotate-1.19-1.el5.rf.noarch.rpmrpm -Uvh perl-IPC-Shareable-0.60-1.2.el5.rf.noarch.rpmrpm -Uvh perl-XML-RegExp-0.03-2.el5.noarch.rpmrpm -Uvh perl-XML-DOM-1.44-2.el5.noarch.rpmrpm -Uvh perl-Log-Log4perl-1.13-1.el5.rf.noarch.rpmrpm -Uvh perl-Log-Log4perl-RRDs-1.13-1.el5.rf.noarch.rpmrpm -Uvh perl-Proc-Daemon-0.03-1.2.el5.rf.noarch.rpmrpm -Uvh perl-Net-ARP-1.0.6-1.el5.rf.i386.rpm
The above can basically overwrite all dependency files that cannot be installed through yum. If you still prompt that some dependencies cannot be found during startup, you can install them after the: http://pkgs.org/search download, but be sure to keep the version consistent.
Ii. Problems with starting mysql-mmm-Monitor
When you solve the problem encountered during mysql-mmm-monitor startup, you can set debug to 1 in/etc/MySQL-MMM/mmm_mon.conf to view detailed error information.
Error 1: The error code is displayed in/var/log/MySQL-MMM/mmm_mon.log.
FATAL Can't open pid file '/var/run/mysql-mmm/mmm_mond.pid' for writing!
Because the mysql-Mmm directory does not exist under/var/run, you cannot write mmm_mond.pid. Just create one.
Error 2:
open2: exec of /usr/libexec/mysql-mmm/monitor/checker ping_ip failed at /usr/lib/perl5/vendor_perl/5.8.8/MMM/Monitor/Checker.pm line 143
Search by the find command and find that the actual location of the checker is under/usr/lib/MySQL-MMM/monitor. Then modify the mmm_mon.conf file, reset bin_path to/usr/lib/MySQL-Mmm.
Error 3: The Database Host cannot be connected after the instance is started. You can use mmm_control show to view the information:
# mmm_control show# Warning: agent on host db01 is not reachable# Warning: agent on host db02 is not reachable# Warning: agent on host db03 is not reachable# Warning: agent on host db04 is not reachable db01(192.168.105.86) master/AWAITING_RECOVERY. Roles: db02(192.168.105.87) master/AWAITING_RECOVERY. Roles: db03(192.168.105.88) slave/AWAITING_RECOVERY. Roles: db04(192.168.105.89) slave/AWAITING_RECOVERY. Roles:
If the same problem occurs last time, telnet to get"Connection refused". Log on to the Database Host and check the mysql-mmm-agent status. It was not started. The following information is displayed in/var/log/MySQL-MMM/mmm_agent.log:
FATAL Can't open pid file '/var/run/mysql-mmm/mmm_agentd.pid' for writing!
In the same case as error 1, create a MySQL-Mmm directory under/var/run and restart mysql-mmm-agent.