@kenyon_君羊 你好,想跟你请教个问题:我看了您写的“用Haproxy来做PostgreSQL的负载均衡”这篇文章,系统rhel-server-7.1-x86_64-dvd,postgresql9.4.5 haproxy1.6.3
问题1:怎么看出来必须要创建haproxy的数据库?
问题2:haproxy -f /etc/haproxy/haproxy.cfg
报错[WARNING] 298/044123 (27692) : config : proxy 'postgresql' has no 'bind' directive. Please declare it as a backend if this was intended.
systemctl status haproxy.service
报错haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.
Loaded: loaded (/etc/rc.d/init.d/haproxy)
Active: failed (Result: exit-code) since Tue 2016-10-25 04:43:46 EDT; 11s ago
Process: 27717 ExecStart=/etc/rc.d/init.d/haproxy start (code=exited, status=203/EXEC)
Oct 25 04:43:46 haproxy.localdomain systemd[1]: Starting SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited ...ts....
Oct 25 04:43:46 haproxy.localdomain systemd[1]: haproxy.service: control process exited, code=exited status=203
Oct 25 04:43:46 haproxy.localdomain systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly ...ents..
Oct 25 04:43:46 haproxy.localdomain systemd[1]: Unit haproxy.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
另外两个数据库服务器都是LOG: could not receive data from client: Connection reset by peer
1.没有必须要创建proxy的库,只是建了个proxy的用户
2.看着像是网络问题
回复 @沉默的世界:mysql我有遇到过,重启下slave搞定之前的问题我已解决,谢谢回复 @kenyon_君羊:您这边有没有遇到过数据库几天不工作,然后在主机上添加数据,备机上数据没有流复制过去的现象couldnotreceivedatafromclient:Connectionresetbypeer这个是什么原因?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。