用Haproxy来做PostgreSQL的负载均衡
@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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
could not receive data from client: Connection reset by peer这个是什么原因?
回复
@kenyon_君羊 : 您这边有没有遇到过数据库几天不工作,然后在主机上添加数据,备机上数据没有流复制过去的现象
之前的问题我已解决,谢谢
回复
mysql我有遇到过,重启下slave搞定
1.没有必须要创建proxy的库,只是建了个proxy的用户
2.看着像是网络问题