千家信息网

MHA监控检测报错

发表于:2025-02-23 作者:千家信息网编辑
千家信息网最后更新 2025年02月23日,MHA安装之后一直正常运行,中间也有出现过切换的情况,不过都正常进行,后有其他dba在mha自动切换后做过一些操作,但并未说做了哪些操作。我再查看状态时,发现监控没有在运行,于是手工启动,结果就报以下
千家信息网最后更新 2025年02月23日MHA监控检测报错

MHA安装之后一直正常运行,中间也有出现过切换的情况,不过都正常进行,后有其他dba在mha自动切换后做过一些操作,但并未说做了哪些操作。我再查看状态时,发现监控没有在运行,于是手工启动,结果就报以下错误:

Mon Nov 20 17:15:11 2017 - [info] MHA::MasterMonitor version 0.56.Mon Nov 20 17:15:12 2017 - [info] GTID failover mode = 0Mon Nov 20 17:15:12 2017 - [info] Dead Servers:Mon Nov 20 17:15:12 2017 - [info] Alive Servers:Mon Nov 20 17:15:12 2017 - [info]   192.168.2.211(192.168.2.211:3206)Mon Nov 20 17:15:12 2017 - [info]   192.168.2.212(192.168.2.212:3206)Mon Nov 20 17:15:12 2017 - [info]   192.168.2.213(192.168.2.213:3206)Mon Nov 20 17:15:12 2017 - [info] Alive Slaves:Mon Nov 20 17:15:12 2017 - [info]   192.168.2.212(192.168.2.212:3206)  Version=5.6.24-log (oldest major version between slaves) log-bin:enabledMon Nov 20 17:15:12 2017 - [info]     Replicating from 192.168.2.211(192.168.2.211:3206)Mon Nov 20 17:15:12 2017 - [info]     Primary candidate for the new Master (candidate_master is set)Mon Nov 20 17:15:12 2017 - [info]   192.168.2.213(192.168.2.213:3206)  Version=5.6.24-log (oldest major version between slaves) log-bin:enabledMon Nov 20 17:15:12 2017 - [info]     Replicating from 192.168.2.211(192.168.2.211:3206)Mon Nov 20 17:15:12 2017 - [info]     Not candidate for the new Master (no_master is set)Mon Nov 20 17:15:12 2017 - [info] Current Alive Master: 192.168.2.211(192.168.2.211:3206)Mon Nov 20 17:15:12 2017 - [info] Checking slave configurations..Mon Nov 20 17:15:12 2017 - [warning]  relay_log_purge=0 is not set on slave 192.168.2.213(192.168.2.213:3206).Mon Nov 20 17:15:12 2017 - [info] Checking replication filtering settings..Mon Nov 20 17:15:12 2017 - [info]  binlog_do_db= , binlog_ignore_db=Mon Nov 20 17:15:12 2017 - [info]  Replication filtering check ok.Mon Nov 20 17:15:12 2017 - [info] GTID (with auto-pos) is not supportedMon Nov 20 17:15:12 2017 - [info] Starting SSH connection tests..Mon Nov 20 17:15:15 2017 - [info] All SSH connection tests passed successfully.Mon Nov 20 17:15:15 2017 - [info] Checking MHA Node version..Mon Nov 20 17:15:15 2017 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, ln122] Got error when getting node version. Error:Mon Nov 20 17:15:15 2017 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, ln123]bash: apply_diff_relay_logs: command not foundMon Nov 20 17:15:15 2017 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, ln150] node version on 192.168.2.212 not found! Is MHA Node package installed ? at /usr/local/share/perl5/MHA/MasterMonitor.pm line 374.Mon Nov 20 17:15:15 2017 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. node version on 192.168.2.212 not found! Is MHA Node package installed ? at /usr/local/share/perl5/MHA/MasterMonitor.pm line 374.        ...propagated at /usr/local/share/perl5/MHA/ManagerUtil.pm line 151.Mon Nov 20 17:15:15 2017 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.Mon Nov 20 17:15:15 2017 - [info] Got exit code 1 (Not master dead).

提示到不到命令,同时提示我是否节点2是否没有安装node包,我做过以下尝试:

1)尝试配置环境变量路径,错误依旧。

2)尝试重新安装node包,错误依旧。

网上也查找过报错信息,但都是千篇一律,一篇文章转来转去,没有对应的解决方法。

后来空了又仔细看了下,问题解决掉了,解决方法如下:

[root@kxt-mha-03 ~]# find / -name apply_diff_relay_logs/usr/local/bin/apply_diff_relay_logs[root@kxt-mha-03 ~]# ln -s /usr/local/bin/apply_diff_relay_logs  /usr/bin/[root@kxt-mha-03 ~]# ln -s /usr/local/bin/save_binary_logs   /usr/bin/[root@kxt-mha-02 ~]# ln -s /usr/local/bin/apply_diff_relay_logs  /usr/bin/[root@kxt-mha-02 ~]# ln -s /usr/local/bin/save_binary_logs   /usr/bin/[root@kxt-mha-01 ~]# ln -s /usr/local/bin/apply_diff_relay_logs  /usr/bin/[root@kxt-mha-01 ~]# ln -s /usr/local/bin/save_binary_logs   /usr/bin/再次做检测:Wed Feb 28 10:48:40 2018 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.Wed Feb 28 10:48:40 2018 - [info] Reading application default configuration from /etc/mha/conf/app1.cnf..Wed Feb 28 10:48:40 2018 - [info] Reading server configuration from /etc/mha/conf/app1.cnf..Wed Feb 28 10:48:40 2018 - [info] MHA::MasterMonitor version 0.56.Wed Feb 28 10:48:41 2018 - [info] GTID failover mode = 0Wed Feb 28 10:48:41 2018 - [info] Dead Servers:Wed Feb 28 10:48:41 2018 - [info] Alive Servers:Wed Feb 28 10:48:41 2018 - [info]   192.168.2.211(192.168.2.211:3206)Wed Feb 28 10:48:41 2018 - [info]   192.168.2.212(192.168.2.212:3206)Wed Feb 28 10:48:41 2018 - [info]   192.168.2.213(192.168.2.213:3206)Wed Feb 28 10:48:41 2018 - [info] Alive Slaves:Wed Feb 28 10:48:41 2018 - [info]   192.168.2.212(192.168.2.212:3206)  Version=5.6.24-log (oldest major version between slaves) log-bin:enabledWed Feb 28 10:48:41 2018 - [info]     Replicating from 192.168.2.211(192.168.2.211:3206)Wed Feb 28 10:48:41 2018 - [info]     Primary candidate for the new Master (candidate_master is set)Wed Feb 28 10:48:41 2018 - [info]   192.168.2.213(192.168.2.213:3206)  Version=5.6.24-log (oldest major version between slaves) log-bin:enabledWed Feb 28 10:48:41 2018 - [info]     Replicating from 192.168.2.211(192.168.2.211:3206)Wed Feb 28 10:48:41 2018 - [info]     Not candidate for the new Master (no_master is set)Wed Feb 28 10:48:41 2018 - [info] Current Alive Master: 192.168.2.211(192.168.2.211:3206)Wed Feb 28 10:48:41 2018 - [info] Checking slave configurations..Wed Feb 28 10:48:41 2018 - [warning]  relay_log_purge=0 is not set on slave 192.168.2.213(192.168.2.213:3206).Wed Feb 28 10:48:41 2018 - [info] Checking replication filtering settings..Wed Feb 28 10:48:41 2018 - [info]  binlog_do_db= , binlog_ignore_db= Wed Feb 28 10:48:41 2018 - [info]  Replication filtering check ok.Wed Feb 28 10:48:41 2018 - [info] GTID (with auto-pos) is not supportedWed Feb 28 10:48:41 2018 - [info] Starting SSH connection tests..Wed Feb 28 10:48:44 2018 - [info] All SSH connection tests passed successfully.Wed Feb 28 10:48:44 2018 - [info] Checking MHA Node version..Wed Feb 28 10:48:44 2018 - [info]  Version check ok.Wed Feb 28 10:48:44 2018 - [info] Checking SSH publickey authentication settings on the current master..Wed Feb 28 10:48:44 2018 - [info] HealthCheck: SSH to 192.168.2.211 is reachable.Wed Feb 28 10:48:45 2018 - [info] Master MHA Node version is 0.56.Wed Feb 28 10:48:45 2018 - [info] Checking recovery script configurations on 192.168.2.211(192.168.2.211:3206)..Wed Feb 28 10:48:45 2018 - [info]   Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/mysql/data --output_file=/etc/mha/app1/save_binary_logs_test --manager_version=0.56 --start_file=mysql-bin.013591 Wed Feb 28 10:48:45 2018 - [info]   Connecting to root@192.168.2.211(192.168.2.211:22)..   Creating /etc/mha/app1 if not exists..    ok.  Checking output directory is accessible or not..   ok.  Binlog found at /data/mysql/data, up to mysql-bin.013591Wed Feb 28 10:48:45 2018 - [info] Binlog setting check done.Wed Feb 28 10:48:45 2018 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..Wed Feb 28 10:48:45 2018 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.2.212 --slave_ip=192.168.2.212 --slave_port=3206 --workdir=/etc/mha/app1 --target_version=5.6.24-log --manager_version=0.56 --relay_dir=/data/mysql/data --current_relay_log=mysql-relay-bin.000091  --slave_pass=xxxWed Feb 28 10:48:45 2018 - [info]   Connecting to root@192.168.2.212(192.168.2.212:22)..   Checking slave recovery environment settings..    Relay log found at /data/mysql/data, up to mysql-relay-bin.000091    Temporary relay log file is /data/mysql/data/mysql-relay-bin.000091    Testing mysql connection and privileges..Warning: Using a password on the command line interface can be insecure. done.    Testing mysqlbinlog output.. done.    Cleaning up test file(s).. done.Wed Feb 28 10:48:46 2018 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.2.213 --slave_ip=192.168.2.213 --slave_port=3206 --workdir=/etc/mha/app1 --target_version=5.6.24-log --manager_version=0.56 --relay_dir=/data/mysql/data --current_relay_log=mysql-relay-bin.020034  --slave_pass=xxxWed Feb 28 10:48:46 2018 - [info]   Connecting to root@192.168.2.213(192.168.2.213:22)..   Checking slave recovery environment settings..    Relay log found at /data/mysql/data, up to mysql-relay-bin.020034    Temporary relay log file is /data/mysql/data/mysql-relay-bin.020034    Testing mysql connection and privileges..Warning: Using a password on the command line interface can be insecure. done.    Testing mysqlbinlog output.. done.    Cleaning up test file(s).. done.Wed Feb 28 10:48:46 2018 - [info] Slaves settings check done.Wed Feb 28 10:48:46 2018 - [info] 192.168.2.211(192.168.2.211:3206) (current master) +--192.168.2.212(192.168.2.212:3206) +--192.168.2.213(192.168.2.213:3206)Wed Feb 28 10:48:46 2018 - [info] Checking replication health on 192.168.2.212..Wed Feb 28 10:48:46 2018 - [info]  ok.Wed Feb 28 10:48:46 2018 - [info] Checking replication health on 192.168.2.213..Wed Feb 28 10:48:46 2018 - [info]  ok.Wed Feb 28 10:48:46 2018 - [warning] master_ip_failover_script is not defined.Wed Feb 28 10:48:46 2018 - [warning] shutdown_script is not defined.Wed Feb 28 10:48:46 2018 - [info] Got exit code 0 (Not master dead).MySQL Replication Health is OK.

至此问题解决。


错误 尝试 方法 问题 切换 提示 运行 检测 监控 千篇一律 转来转去 信息 再次 变量 同时 命令 情况 手工 状态 环境 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 我的世界大型服务器主城图片 山西宽宽网络技术公司诈骗 系统服务器管理员密码 数据库完全备份与恢复 高级软件开发工程师方向 网络安全领域补短板 关系数据库的三级模式是什么 网络安全攻击的根本原因 嘟嘟网络技术有限公司广告机 怎么获取城市具体的数据库 电脑做的服务器怎么让电视访问 服务器备份系统多少钱 游戏服务器和web后端 长沙软件开发最好的专科学校 计算机网络技术远程医疗 网络安全为我们带来的益处 青橄榄网络技术 知网数据库逻辑连接词 软件开发期刊 小木虫 如何搞到远程服务器 开放大学 计算机网络技术 课程 软件开发笔记本六核够用吗 b站服务器内部错误 中国 数据库 github 山西网络安全大赛决赛 网络安全体系建设汇报材料 网络安全中入侵者分类及特点 如何提高计算机网络安全管理 2kol2创建角色服务器繁忙 达梦数据库分析函数
0