我可以访问所有的网站没有问题,我们的客户没有任何困难地下订单,但在我们有很多用户不断点击网站的地点之一,突然间他们无法连接到一个的前端绑定。
他们能够查看haproxy监控页面并访问其他前端的站点。
Haproxy没有负载,我没有启用任何configuration,应该限制stream量出于任何原因。
Amazon Linux或Haproxy是否有任何types的默认防火墙会阻止来自单个IP地址的大量连接?
这是我的configuration:
global log 127.0.0.1 local1 #logs are saved in /var/log and rotated to not fill up. #http://kvz.io/blog/2010/08/11/haproxy-logging/ chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 50000 user haproxy group haproxy daemon stats socket /var/lib/haproxy/stats defaults mode http log global option httplog option dontlognull option http-server-close option forwardfor except 127.0.0.0/8 option redispatch #added to hopefully solve 400 bad request errors option accept-invalid-http-request timeout http-request 15s timeout queue 1m timeout connect 10s timeout client 2m timeout server 2m timeout http-keep-alive 10s timeout check 5s retries 3 balance roundrobin maxconn 100000 stats enable #stats refresh 10s stats uri /haproxy?stats stats auth admin:Super187 monitor-uri /haproxy?monitor frontend Websites_IN bind 10.60.49.51:80 name http bind 10.60.49.51:443 name https ssl crt /etc/haproxy/haproxy_ssl.pem reqadd X-Forwarded-Proto:\ https if { ssl_fc } reqadd X-Forwarded-Port:\ 443 if { ssl_fc } reqadd X-Forwarded-Proto:\ http if !{ ssl_fc } reqadd X-Forwarded-Port:\ 80 if !{ ssl_fc } acl host_Site1 hdr(host) -m dom -i www.site1.com use_backend Website_Site1 if host_Site1 acl host_Site2 hdr(host) -m dom -i www.site2.com use_backend Website_Site2 if host_Site1 backend Website_Site1 option httpchk GET /monitor/ HTTP/1.1\r\nHost:\ www.site1.com http-check expect string OK cookie SVRDJ insert indirect nocache errorfile 503 /etc/haproxy/errors/503.http server Web1ZoneD 10.60.17.72:80 cookie Web1ZoneD check inter 2000 rise 2 fall 2 server Web1ZoneE 10.60.42.156:80 cookie Web1ZoneE check inter 2000 rise 2 fall 2 server Web2ZoneD 10.60.27.94:80 cookie Web2ZoneD check inter 2000 rise 2 fall 2 server Web2ZoneE 10.60.35.129:80 cookie Web2ZoneE check inter 2000 rise 2 fall 2 backend Website_Site2 option httpchk GET /monitor/ HTTP/1.1\r\nHost:\ www.site2.com http-check expect string OK cookie SVRDJ2 insert indirect nocache errorfile 503 /etc/haproxy/errors/503.http server Web1ZoneD 10.60.17.72:80 cookie Web1ZoneD check inter 2000 rise 2 fall 2 server Web1ZoneE 10.60.42.156:80 cookie Web1ZoneE check inter 2000 rise 2 fall 2 server Web2ZoneD 10.60.27.94:80 cookie Web2ZoneD check inter 2000 rise 2 fall 2 server Web2ZoneE 10.60.35.129:80 cookie Web2ZoneE check inter 2000 rise 2 fall 2
只是包括一点点细节…
这个问题在工作两个星期后开始了。 第一次报告时,我故障转移到我们的备用服务器(2分离HAproxy实例具有类似的configuration),并再次工作15个小时。 我尝试恢复到以前已知的工作configuration,但没有改变。 我添加了一个新的ACL和后端到不工作的前端和presto,我的用户可以看到NEW域(只是称之为site3),但仍然不能看到在同一前端的其他人。 请注意,所有网站都使用同一组服务器上的主机标头进行设置。 我也有一些其他的前端部分在不同的IP上,为同样的用户正常工作。 我已经设置了一些网站需要基本的身份validation,用户将得到authpopup窗口,但没有得到该网站。
我已经检查了负载和服务器运行在<20%的CPU和几乎没有任何内存。 它在一个m1.small ec2实例上运行。
我检查了我的iptables规则,它们是空的。 我甚至无法在服务器上findiptables日志。 我怎么知道防火墙是打开还是closures?
另外,我已经多次重启了每个服务器,并且以相同的结果对每个服务器进行了故障恢复。
我有日志logging设置使用此configuration使用rsyslog:
# Provides UDP syslog reception $ModLoad imudp $UDPServerRun 514 $UDPServerAddress 127.0.0.1 #Haproxy log stuff #http://blog.hintcafe.com/post/33689067443/haproxy-logging-with-rsyslog-on-linux $template Haproxy,"%msg%\n" local1.=info -/var/log/haproxy/haproxy-info.log;Haproxy local1.notice -/var/log/haproxy/haproxy-system.admin;Haproxy # don't log anywhere else local1.* ~
我认为这应该捕获所有的HAproxy日志数据。 我不知道如何启用debugging呢。
想知道如果我只是更新haproxy到最新的DEV版本?
这是根据评论中的要求的结果。
UID PID PPID C STIME TTY TIME CMD root 1 0 0 02:19 ? 00:00:01 /sbin/init root 2 0 0 02:19 ? 00:00:00 [kthreadd] root 3 2 0 02:19 ? 00:00:00 [ksoftirqd/0] root 4 2 0 02:19 ? 00:00:00 [kworker/0:0] root 5 2 0 02:19 ? 00:00:00 [kworker/u:0] root 6 2 0 02:19 ? 00:00:00 [migration/0] root 7 2 0 02:19 ? 00:00:00 [cpuset] root 8 2 0 02:19 ? 00:00:00 [khelper] root 9 2 0 02:19 ? 00:00:00 [kdevtmpfs] root 10 2 0 02:19 ? 00:00:00 [netns] root 11 2 0 02:19 ? 00:00:00 [kworker/u:1] root 15 2 0 02:19 ? 00:00:00 [xenwatch] root 16 2 0 02:19 ? 00:00:01 [xenbus] root 83 2 0 02:19 ? 00:00:00 [sync_supers] root 85 2 0 02:19 ? 00:00:00 [bdi-default] root 86 2 0 02:19 ? 00:00:00 [kintegrityd] root 88 2 0 02:19 ? 00:00:00 [kblockd] root 103 2 0 02:19 ? 00:00:00 [md] root 201 2 0 02:19 ? 00:00:00 [khungtaskd] root 206 2 0 02:19 ? 00:00:00 [kswapd0] root 207 2 0 02:19 ? 00:00:00 [ksmd] root 277 2 0 02:19 ? 00:00:00 [fsnotify_mark] root 282 2 0 02:19 ? 00:00:00 [crypto] root 289 2 0 02:19 ? 00:00:00 [kthrotld] root 295 2 0 02:19 ? 00:00:00 [khvcd] root 346 2 0 02:19 ? 00:00:02 [kworker/0:2] root 355 2 0 02:19 ? 00:00:00 [deferwq] root 628 2 0 02:19 ? 00:00:01 [jbd2/xvda1-8] root 629 2 0 02:19 ? 00:00:00 [ext4-dio-unwrit] root 668 1 0 02:19 ? 00:00:00 /sbin/udevd -d root 777 668 0 02:19 ? 00:00:00 /sbin/udevd -d root 787 668 0 02:19 ? 00:00:00 /sbin/udevd -d root 1009 2 0 02:19 ? 00:00:00 [kauditd] root 1130 2 0 02:19 ? 00:00:00 [flush-202:1] root 1182 1 0 02:19 ? 00:00:00 /sbin/dhclient -q -lf /var/lib/dhclient/dhclient-eth root 1225 1 0 02:19 ? 00:00:00 auditd root 1240 1 0 02:19 ? 00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5 rpc 1264 1 0 02:19 ? 00:00:00 rpcbind rpcuser 1281 1 0 02:19 ? 00:00:00 rpc.statd root 1305 2 0 02:19 ? 00:00:00 [rpciod] root 1308 1 0 02:19 ? 00:00:00 rpc.idmapd root 1315 1 0 02:19 ? 00:00:07 ha_logd: read process root 1318 1315 0 02:19 ? 00:00:06 ha_logd: write process dbus 1338 1 0 02:19 ? 00:00:00 dbus-daemon --system root 1383 1 0 02:19 ? 00:00:27 bash /etc/haproxy/hamonitor root 1404 1 0 02:19 ? 00:00:00 /usr/sbin/sshd ntp 1431 1 0 02:19 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g root 1446 1 0 02:19 ? 00:00:02 sendmail: accepting connections smmsp 1453 1 0 02:19 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clien haproxy 1465 1 0 02:19 ? 00:07:47 /usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg -p root 1473 1 0 02:19 ? 00:00:00 crond root 1483 1 0 02:19 ? 00:00:00 /usr/sbin/atd root 1503 1 0 02:19 tty1 00:00:00 /sbin/mingetty /dev/tty1 root 1507 1 0 02:19 tty2 00:00:00 /sbin/mingetty /dev/tty2 root 1509 1 0 02:19 tty3 00:00:00 /sbin/mingetty /dev/tty3 root 1511 1 0 02:19 hvc0 00:00:00 /sbin/agetty /dev/hvc0 38400 vt100-nav root 1512 1 0 02:19 tty4 00:00:00 /sbin/mingetty /dev/tty4 root 1514 1 0 02:19 tty5 00:00:00 /sbin/mingetty /dev/tty5 root 1516 1 0 02:19 tty6 00:00:00 /sbin/mingetty /dev/tty6 root 11917 1404 0 15:57 ? 00:00:00 sshd: ec2-user [priv] ec2-user 11921 11917 0 15:57 ? 00:00:00 sshd: ec2-user@pts/0 ec2-user 11922 11921 0 15:57 pts/0 00:00:00 -bash root 11945 11922 0 15:57 pts/0 00:00:00 sudo -s root 11946 11945 0 15:57 pts/0 00:00:00 /bin/bash newrelic 13357 1 0 16:22 ? 00:00:00 /usr/sbin/nrsysmond -c /etc/newrelic/nrsysmond.cfg - newrelic 13359 13357 0 16:22 ? 00:00:17 /usr/sbin/nrsysmond -c /etc/newrelic/nrsysmond.cfg - root 30012 1383 0 21:40 ? 00:00:00 sleep 5