读写分离遇到的问题

数据库 waitig 833℃ 百度已收录 0评论

在做读写分离的【proxy开启时,我把lua脚本的位置写错了;然后一致执行

[root@server1 mysql-proxy]#  /usr/local/mysql-proxy/bin/mysql-proxy --defaults-file=/usr/local/mysql-proxy/conf/mysql-proxy.conf

一直日志有错误

2017-10-21 11:45:16: (message) chassis-unix-daemon.c:136: [angel] we try to keep PID=1341 alive
2017-10-21 11:45:16: (critical) plugin proxy 0.8.5 started
2017-10-21 11:45:16: (critical) plugin admin 0.8.5 started
2017-10-21 11:45:16: (critical) last message repeated 1 times
2017-10-21 11:45:16: (critical) network-mysqld-lua.c:234: lua_load_file(/usr/local/mysql-proxy/share/doc/mysql-proxy/lua/rw-splitting.lua) failed: lua-scope.c:241: stat(/usr/local/mysql-proxy/share/doc/mysql-proxy/lua/rw-splitting.lua) failed: No such file or directory (2)
2017-10-21 11:45:16: (critical) network-socket.c:492: bind(172.25.28.1:3306) failed: Address already in use (98)
2017-10-21 11:45:16: (critical) chassis-mainloop.c:270: applying config of plugin proxy failed
2017-10-21 11:45:16: (critical) mysql-proxy-cli.c:599: Failure from chassis_mainloop. Shutting down.
2017-10-21 11:45:16: (message) Initiating shutdown, requested from mysql-proxy-cli.c:600
2017-10-21 11:45:16: (message) shutting down normally, exit code is: 1
2017-10-21 11:45:16: (message) chassis-unix-daemon.c:176: [angel] PID=1341 exited normally with exit-code = 1 (it used 1 kBytes max)
2017-10-21 11:45:16: (message) Initiating shutdown, requested from mysql-proxy-cli.c:273
2017-10-21 11:45:16: (message) shutting down normally, exit code is: 1

最后才知道执行上面那条,命令压根没有运行,这种proxy调用模块的不像其他的可以重启重新加载日志:所以我们应当kill掉原来的进程:

 killall mysql-proxy

本文由【waitig】发表在等英博客
本文固定链接:读写分离遇到的问题
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)