代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/haproxy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
每个机器的ip地址:
1、The ip address of each machine:
client ip: 19.182.211.230
haproxy server ip:
eth0 19.182.251.91
eth1 19.182.173.96
http server ip: 19.182.182.149
2、haproxy server config:
echo '19.182.182.149 web1' >> /etc/hosts
cat /etc/haproxy/haproxy.cfg
global
log 127.0.0.1 local0
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
daemon
maxconn 4000
defaults
mode http
log global
option httplog
retries 3
option dontlognull
option redispatch
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
maxconn 3000
default-server source 19.182.173.96 interface eth1
frontend main
bind *:80
default_backend http_back
backend http_back
balance roundrobin
server web1 19.182.182.149:80 cookie node1 check
3、19.182.182.149 http server config:
启动80端口http服务(Start the http service on port 80 in the background)
python3 -m http.server 80&
echo '19.182.251.91 haproxy_server' >> /etc/hosts
4、client config(add haproxy service map):
echo '19.182.251.91 haproxy_server' >> /etc/hosts
#The above is configured to access the haproxy service via curl
curl haproxy_server
<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>
b7ff822合入后,配置了一个简单haproxy服务,'interface'参数生效('source' subargument),连接不到http服务器,但eth0不会报错。
After b7ff822 merged in, configured a simple haproxy service with the 'interface' parameter in effect ('source' subargument), can't connect to the http server, but eth0 doesn't report errors.
我测试了每个haproxy版本(2.6~2.9)(修复了b7ff822),一样的错误
I tested every haproxy version (2.6~2.9) (fixed b7ff822), same error
journalctl -xfu haproxy
Apr 29 14:28:25 haproxy_server haproxy[33180]: [WARNING] (33180) : Server http_back/web1 is DOWN, reason: Layer4 timeout, check duration: 2002ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Apr 29 14:28:25 haproxy_server haproxy[33180]: [ALERT] (33180) : backend 'http_back' has no server available!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。