mysql MHA报错 Can't exec "mysqlbinlog": No such file or directory at /usr/local/share/perl5/MHA/BinlogManager.pm line 99.
如果发现如下错误:
- Can't exec "mysqlbinlog": No such file or directory at /usr/local/share/perl5/MHA/BinlogManager.pm line 99.
- mysqlbinlog version not found!
- Testing mysql connection and privileges..sh: mysql: command not found
- mysql command failed with rc 127:0!
可以通过以下方法解决(在所有节点上执行):

- 192.168.2.128 [root ~]$ ln -s /usr/local/mysql/bin/mysqlbinlog /usr/local/bin/mysqlbinlog
- 192.168.2.128 [root ~]$ ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
- 192.168.2.129 [root ~]$ ln -s /usr/local/mysql/bin/mysqlbinlog /usr/local/bin/mysqlbinlog
- 192.168.2.129 [root ~]$ ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
- 192.168.2.130 [root ~]$ ln -s /usr/local/mysql/bin/mysqlbinlog /usr/local/bin/mysqlbinlog
- 192.168.2.130 [root ~]$ ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql

再进行检查

- 192.168.2.131 [root ~]$ masterha_check_repl --conf=/etc/masterha/app1.cnf
- Sun Jan 18 13:19:41 2015 - [info] Checking replication health on 192.168.2.129..
- Sun Jan 18 13:19:41 2015 - [info] ok.
- Sun Jan 18 13:19:41 2015 - [info] Checking replication health on 192.168.2.130..
- Sun Jan 18 13:19:41 2015 - [info] ok.
- Sun Jan 18 13:19:41 2015 - [info] Checking master_ip_failover_script status:
- Sun Jan 18 13:19:41 2015 - [info] /usr/local/bin/master_ip_failover --command=status --ssh_user=root --orig_master_host=192.168.2.128 --orig_master_ip=192.168.2.128 --orig_master_port=3306
- Bareword "FIXME_xxx" not allowed while "strict subs" in use at /usr/local/bin/master_ip_failover line 88.
- Execution of /usr/local/bin/master_ip_failover aborted due to compilation errors.
- Sun Jan 18 13:19:41 2015 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln214] Failed to get master_ip_failover_script status with return code 255:0.
- Sun Jan 18 13:19:41 2015 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln383] Error happend on checking configurations. at /usr/local/bin/masterha_check_repl line 48
- Sun Jan 18 13:19:41 2015 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln478] Error happened on monitoring servers.
- Sun Jan 18 13:19:41 2015 - [info] Got exit code 1 (Not master dead).
- MySQL Replication Health is NOT OK!
- 192.168.2.131 [root ~]$

还是报错,纠结N久,才发现原因是:原来Failover两种方式:一种是虚拟IP地址,一种是全局配置文件。MHA并没有限定使用哪一种方式,而是让用户自己选择,虚拟IP地址的方式会牵扯到其它的软件,比如keepalive软件,而且还要修改脚本master_ip_failover。
所以先暂时注释master_ip_failover_script= /usr/local/bin/master_ip_failover这个选项。后面引入keepalived后和修改该脚本以后再开启该选项
- 192.168.2.131 [root ~]$ grep master_ip_failover /etc/masterha/app1.cnf
- #master_ip_failover_script= /usr/local/bin/master_ip_failover
再次进行状态查看:

- 192.168.2.131 [root ~]$ masterha_check_repl --conf=/etc/masterha/app1.cnf
- Sun Jan 18 13:23:57 2015 - [info] Slaves settings check done.
- Sun Jan 18 13:23:57 2015 - [info]
- 192.168.2.128 (current master)
- +--192.168.2.129
- +--192.168.2.130
- Sun Jan 18 13:23:57 2015 - [info] Checking replication health on 192.168.2.129..
- Sun Jan 18 13:23:57 2015 - [info] ok.
- Sun Jan 18 13:23:57 2015 - [info] Checking replication health on 192.168.2.130..
- Sun Jan 18 13:23:57 2015 - [info] ok.
- Sun Jan 18 13:23:57 2015 - [warning] master_ip_failover_script is not defined.
- Sun Jan 18 13:23:57 2015 - [warning] shutdown_script is not defined.
- Sun Jan 18 13:23:57 2015 - [info] Got exit code 0 (Not master dead).
- MySQL Replication Health is OK.
- 192.168.2.131 [root ~]$

已经没有明显报错,只有两个警告而已,复制也显示正常了,哈哈,没报错了,先乐一会^0^
mysql MHA报错 Can't exec "mysqlbinlog": No such file or directory at /usr/local/share/perl5/MHA/BinlogManager.pm line 99.的更多相关文章
- Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
今天执行:autoreconf -fvi的时候出现如下错误: autoreconf: Entering directory `.' autoreconf: configure.in: not usin ...
- TP连接数据库报错:SQLSTATE[HY000] [2002] No such file or directory
连接数据库报错:“SQLSTATE[HY000] [2002] No such file or directory”. 出现这个问题的原因是PDO无法找到mysql.sock或者mysqld.soc ...
- cnmp安装失败,报错npm ERR! enoent ENOENT: no such file or directory,
1.cnmp安装失败 2.提示如下: bogon:node_modules liangjingming$ sudo npm install cnpm -g --registry=https://reg ...
- Windows下使用ssh-add报错 Error connecting to agent: No such file or directory
Windows下使用ssh-add报错 Error connecting to agent: No such file or directory 环境信息 操作系统:windows 10 终端:Win ...
- npm安装socket.io时报错的解决方法(npm WARN enoent ENOENT: no such file or directory, open '/usr/local/nodejs/bin/package.json')
执行 npm install socket.io安装时报错: [root@WEB node_modules]# npm install socket.ionpm WARN enoent ENOENT: ...
- mysql启动报错 The server quit without updating PID file
[root@uz6542 data]# /etc/init.d/mysqld startStarting MySQL... ERROR! The server quit without updatin ...
- 解决mac os下mcss命令报错:env: node\r: No such file or directory
标题无“转载”即原创文章,版权所有.转载请注明来源:http://besteam.im/blogs/article/31/. 我一直对字符界面有抵触感,即使会用vim,我的linux脚本(python ...
- 编译APR包报错 rm: cannot remove `libtoolT': No such file or directory
centos 6 编译APR包报错 在当前apr 目录 : #Vi configure +31880 ,注释掉此行 再次编译即可.
- 编译 redis 报错 error: jemalloc/jemalloc.h: No such file or directory
gcc编译redis时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2 ...
随机推荐
- 论文笔记《Fully Convolutional Networks for Semantic Segmentation》
一.Abstract 提出了一种end-to-end的做semantic segmentation的方法,也就是FCN,是我个人觉得非常厉害的一个方法. 二.亮点 1.提出了全卷积网络的概念,将Ale ...
- 【CCF】除法 树状数组
[AC] #include<iostream> #include<math.h> #include<cstring> using namespace std; ty ...
- [暑假集训--数论]poj3518 Prime Gap
The sequence of n − 1 consecutive composite numbers (positive integers that are not prime and not eq ...
- nodeJS学习(7)--- WS开发 NodeJS 项目-节2 <安装&设置&启动 mongodb 数据库++遇到的问题>
本文系统 win7 参考:http://lib.csdn.net/article/mongodb/58097 http://www.cnblogs.com/lzrabbit/p/3682510.ht ...
- hdu 1423 最长上升递增子序列
#include <iostream> #include <cstdio> #include <cstring> using namespace std; ; in ...
- alloc_chrdev_region申请一个动态主设备号,并申请一系列次设备号
ret = alloc_chrdev_region(&ndev, 0, 1, "chr_dev"); //分配设备号 alloc_chrdev_region申请一个动态主设 ...
- hdu 2363(枚举+最短路好题)
Cycling Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub ...
- GIT 的常规操作
GIT 的常规操作 常规操作也是我自己平时常用的几个命令, 学自于 pro git 这本书中 git 配置文件 git的配置文件位置 针对所有用户:/etc/gitconfig 针对当前用户: -/. ...
- java获取整数的各位数值
第一种是取模运算 int qian =input/1000; //千位除以1000 int bai = input/100%10;//百位除以100%10 int shi = input%100/10 ...
- Codeforces 919 D Substring
题目描述 You are given a graph with nn nodes and mm directed edges. One lowercase letter is assigned to ...