启动后,稍等几秒,可以通过mmm_control程序查看状态:
# mmm_control show
db1(192.168.85.167) master/ONLINE. Roles: writer(192.168.85.200)
db2(192.168.85.169) master/ONLINE. Roles: reader(192.168.85.202)
db3(192.168.85.171) slave/ONLINE. Roles: reader(192.168.85.203)
db4(192.168.85.168) slave/ONLINE. Roles: reader(192.168.85.201)
七、遇到两个问题
1. 监控程序服务器无法启动
在管理服务器上,一切都完成后,通过mmm_control查看状态,得到下面的错误信息:ERROR: Can't connect to monitor daemon! 通过编辑/etc/mysql-mmm/mmm_mon.conf文件将debug 0改为debug 1,打开监控程序的debug状态。重新启动监控程序(service mysql-mmm-monitor restart),就会看到详细的错误信息,找不到Perl Time HiRes库。执行yum -y install perl-Time-HiRes*就可以解决。
2. 防火墙问题导致Warning: agent on host db1 is not reachable.
控制台程序正确启动后,再次执行mmm_control show,却看到下面的输出:
# Warning: agent on host db1 is not reachable
# Warning: agent on host db2 is not reachable
# Warning: agent on host db3 is not reachable
# Warning: agent on host db4 is not reachable
db1(192.168.85.167) master/ONLINE. Roles:
db2(192.168.85.169) master/ONLINE. Roles:
db3(192.168.85.171) slave/ONLINE. Roles:
db4(192.168.85.168) slave/ONLINE. Roles:
再次打开debug,发现了下面的错误信息:
2011/10/07 13:38:45 DEBUG Sending command 'GET_AGENT_STATUS()' to db4 (192.168.85.167:9989)
2011/10/07 13:38:45 ERROR The status of the agent on host 'db4' could not be determined (answer was: 0).
通过telnet 192.168.85.167 9989下面检查网络连接,得到了No route to host的错误信息。登录db1,通过setup程序里的Firewall configuration关闭Firewall(这不是一个好主意)。同样,关闭db2、db3和db4上的防火墙,再次重启监控程序,一切回到正常状态!
参考文章:
MySQL MMM 官方安装文档 http://mysql-mmm.org/mmm2:guide
MMM Manual http://mysql-mmm.org/mysql-mmm.html
您可能感兴趣的文章:
MySQL-MMM安装指南(Multi-Master Replication Manager for MySQL)MySQL高可用MMM方案安装部署分享MySQL数据库的高可用方案总结Keepalived+HAProxy实现MySQL高可用负载均衡的配置MySQL下高可用故障转移方案MHA的超级部署教程详解MySQL高可用MMM搭建方案及架构原理