ip_foward未开启导致slb健康检查异常
现象:
在slb上配置一条7层http监听,并开启健康检查,发现健康检查一直异常。
处理步骤:
针对slb健康检查异常的问题,可从以下四个方面入手,排查原因。
1、确认服务器上业务程序正常启动,且在后端服务器上访问正常 2、检查服务器是否开启内部防火墙 3、检查服务器是否开启selinux 4、检查iptables forward转发是否开启
其中,第一条至低三条均检查没有问题。
于是,在后端服务器上抓包尝试从抓包结果中得到一些有效信息。结果结果如下:
1 0.000000 10.145.24.224 10.145.27.206 SSH 210 Server: Encrypted packet (len=144) 2 0.000115 10.145.27.206 10.145.24.224 TCP 66 41072 → 22 [ACK] Seq=1 Ack=145 Win=1534 Len=0 TSval=2785037844 TSecr=87755750 3 0.201466 100.61.33.0 10.145.24.224 TCP 74 58265 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459079332 TSecr=0 WS=1 4 0.367445 100.61.32.0 10.145.24.224 TCP 74 30259 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458626500 TSecr=0 WS=1 5 0.512056 100.62.14.128 10.145.24.224 TCP 74 57054 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077411716 TSecr=0 WS=1 6 0.723681 100.61.33.128 10.145.24.224 TCP 74 24245 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459856976 TSecr=0 WS=1 7 0.742440 100.62.15.0 10.145.24.224 TCP 74 47913 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080358928 TSecr=0 WS=1 8 1.926856 100.62.14.0 10.145.24.224 TCP 74 38686 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078488136 TSecr=0 WS=1 9 2.886178 100.61.32.128 10.145.24.224 TCP 74 26179 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458864016 TSecr=0 WS=1 10 3.868384 100.62.15.128 10.145.24.224 TCP 74 49942 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081581054 TSecr=0 WS=1 11 3.887578 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 26179 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458865018 TSecr=0 WS=1 12 4.200131 100.61.33.0 10.145.24.224 TCP 74 20308 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459083330 TSecr=0 WS=1 13 4.402555 100.61.32.0 10.145.24.224 TCP 74 60961 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458630535 TSecr=0 WS=1 14 4.465653 100.62.14.128 10.145.24.224 TCP 74 32507 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077415669 TSecr=0 WS=1 15 4.639510 100.61.33.128 10.145.24.224 TCP 74 39944 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459860891 TSecr=0 WS=1 16 4.807308 100.62.15.0 10.145.24.224 TCP 74 55825 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080362992 TSecr=0 WS=1 17 4.869656 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 49942 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081582056 TSecr=0 WS=1 18 5.201492 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 20308 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459084332 TSecr=0 WS=1 19 5.403571 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 60961 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458631536 TSecr=0 WS=1 20 5.467891 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 32507 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077416672 TSecr=0 WS=1 21 5.639652 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 39944 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459861892 TSecr=0 WS=1 22 5.808424 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 55825 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080363994 TSecr=0 WS=1 23 5.833422 100.62.14.0 10.145.24.224 TCP 74 26250 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078492042 TSecr=0 WS=1 24 5.893513 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 26179 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458867024 TSecr=0 WS=1 25 6.513084 10.145.24.224 8.8.8.8 DNS 137 Standard query 0x4e88 A cms-cloudmonitor.cn-hangzhou-zwynet-am360001-a.internet.cloud-inner.zj.gov.cn 26 6.834878 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 26250 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078493044 TSecr=0 WS=1 27 6.873502 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 49942 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081584060 TSecr=0 WS=1 28 7.205513 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 20308 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459086336 TSecr=0 WS=1 29 7.407478 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 60961 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458633540 TSecr=0 WS=1 30 7.471879 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 32507 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077418676 TSecr=0 WS=1 31 7.643650 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 39944 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459863896 TSecr=0 WS=1 32 7.814439 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 55825 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080366000 TSecr=0 WS=1 33 8.515170 10.145.24.224 8.8.8.8 DNS 137 Standard query 0x4e88 A cms-cloudmonitor.cn-hangzhou-zwynet-am360001-a.internet.cloud-inner.zj.gov.cn 34 8.838905 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 26250 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078495048 TSecr=0 WS=1 35 9.871533 100.61.32.128 10.145.24.224 TCP 74 47166 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458871002 TSecr=0 WS=1 36 10.516622 10.145.24.224 8.8.8.8 DNS 137 Standard query 0x4e88 A cms-cloudmonitor.cn-hangzhou-zwynet-am360001-a.internet.cloud-inner.zj.gov.cn 37 10.569957 8.8.8.8 10.145.24.224 DNS 153 Standard query response 0x4e88 A cms-cloudmonitor.cn-hangzhou-zwynet-am360001-a.internet.cloud-inner.zj.gov.cn A 172.31.107.172 38 10.570116 10.145.24.224 172.31.107.172 TCP 74 37894 → 80 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=87766320 TSecr=0 WS=128 39 10.570330 172.31.107.172 10.145.24.224 TCP 66 80 → 37894 [SYN, ACK] Seq=0 Ack=1 Win=29200 Len=0 MSS=1440 SACK_PERM=1 WS=512 40 10.570347 10.145.24.224 172.31.107.172 TCP 54 37894 → 80 [ACK] Seq=1 Ack=1 Win=29312 Len=0 41 10.570379 10.145.24.224 172.31.107.172 TCP 264 37894 → 80 [PSH, ACK] Seq=1 Ack=1 Win=29312 Len=210 [TCP segment of a reassembled PDU] 42 10.570492 172.31.107.172 10.145.24.224 TCP 60 80 → 37894 [ACK] Seq=1 Ack=211 Win=30720 Len=0 43 10.570534 172.31.107.172 10.145.24.224 HTTP 79 HTTP/1.1 100 Continue 44 10.570538 10.145.24.224 172.31.107.172 TCP 54 37894 → 80 [ACK] Seq=211 Ack=26 Win=29312 Len=0 45 10.570568 10.145.24.224 172.31.107.172 TCP 7254 37894 → 80 [ACK] Seq=211 Ack=26 Win=29312 Len=7200 [TCP segment of a reassembled PDU] 46 10.570573 10.145.24.224 172.31.107.172 TCP 7254 37894 → 80 [ACK] Seq=7411 Ack=26 Win=29312 Len=7200 [TCP segment of a reassembled PDU] 47 10.570711 172.31.107.172 10.145.24.224 TCP 60 80 → 37894 [ACK] Seq=26 Ack=14611 Win=59392 Len=0 48 10.570717 10.145.24.224 172.31.107.172 HTTP 278 POST /agent/metrics/putLines HTTP/1.1 (text/plain) 49 10.578544 172.31.107.172 10.145.24.224 HTTP 179 HTTP/1.1 200 OK 50 10.578565 172.31.107.172 10.145.24.224 TCP 60 80 → 37894 [FIN, ACK] Seq=151 Ack=14835 Win=61952 Len=0 51 10.578622 10.145.24.224 172.31.107.172 TCP 54 37894 → 80 [FIN, ACK] Seq=14835 Ack=152 Win=29312 Len=0 52 10.578764 172.31.107.172 10.145.24.224 TCP 60 80 → 37894 [ACK] Seq=152 Ack=14836 Win=61952 Len=0 53 10.828470 100.62.15.128 10.145.24.224 TCP 74 55583 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081588014 TSecr=0 WS=1 54 10.873512 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 47166 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458872004 TSecr=0 WS=1 55 11.290018 100.61.33.0 10.145.24.224 TCP 74 56281 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459090420 TSecr=0 WS=1 56 11.349216 100.61.32.0 10.145.24.224 TCP 74 55486 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458637481 TSecr=0 WS=1 57 11.481112 100.62.14.128 10.145.24.224 TCP 74 23381 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077422685 TSecr=0 WS=1 58 11.697383 100.61.33.128 10.145.24.224 TCP 74 47414 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459867949 TSecr=0 WS=1 59 11.829666 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 55583 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081589016 TSecr=0 WS=1 60 11.894952 100.62.15.0 10.145.24.224 TCP 74 28551 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080370080 TSecr=0 WS=1 61 12.291459 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 56281 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459091422 TSecr=0 WS=1 62 12.351491 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 55486 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458638484 TSecr=0 WS=1 63 12.483940 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 23381 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077423688 TSecr=0 WS=1 64 12.699701 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 47414 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459868952 TSecr=0 WS=1 65 12.736294 100.62.14.0 10.145.24.224 TCP 74 51980 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078498945 TSecr=0 WS=1 66 12.877518 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 47166 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458874008 TSecr=0 WS=1 67 12.896458 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 28551 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080371082 TSecr=0 WS=1 68 13.738869 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 51980 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078499948 TSecr=0 WS=1 69 13.833509 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 55583 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081591020 TSecr=0 WS=1 70 14.293465 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 56281 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459093424 TSecr=0 WS=1 71 14.355496 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 55486 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458640488 TSecr=0 WS=1 72 14.487885 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 23381 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077425692 TSecr=0 WS=1 73 14.703680 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 47414 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459870956 TSecr=0 WS=1 74 14.902506 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 28551 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080373088 TSecr=0 WS=1 75 15.742885 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 51980 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078501952 TSecr=0 WS=1 76 16.828191 100.61.32.128 10.145.24.224 TCP 74 40172 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458877958 TSecr=0 WS=1 77 17.829559 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 40172 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458878960 TSecr=0 WS=1 78 17.874523 100.62.15.128 10.145.24.224 TCP 74 21416 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081595060 TSecr=0 WS=1 79 18.221607 100.61.33.0 10.145.24.224 TCP 74 41614 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459097352 TSecr=0 WS=1 80 18.360236 100.61.32.0 10.145.24.224 TCP 74 55403 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458644492 TSecr=0 WS=1 81 18.451125 100.62.14.128 10.145.24.224 TCP 74 57235 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077429655 TSecr=0 WS=1 82 18.710153 100.61.33.128 10.145.24.224 TCP 74 22874 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459874962 TSecr=0 WS=1 83 18.852782 100.62.15.0 10.145.24.224 TCP 74 60927 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080377038 TSecr=0 WS=1 84 18.877508 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 21416 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081596064 TSecr=0 WS=1 85 19.086661 10.145.24.224 172.31.107.31 TCP 876 58710 → 80 [PSH, ACK] Seq=1 Ack=1 Win=1424 Len=822 86 19.086785 172.31.107.31 10.145.24.224 TCP 60 80 → 58710 [ACK] Seq=1 Ack=823 Win=5202 Len=0 87 19.223505 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 41614 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459098354 TSecr=0 WS=1 88 19.361507 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 55403 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458645494 TSecr=0 WS=1 89 19.451893 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 57235 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077430656 TSecr=0 WS=1 90 19.699412 100.62.14.0 10.145.24.224 TCP 74 54123 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078505908 TSecr=0 WS=1 91 19.711638 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 22874 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459875964 TSecr=0 WS=1 92 19.833457 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 40172 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458880964 TSecr=0 WS=1 93 19.854436 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 60927 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080378040 TSecr=0 WS=1 94 20.700851 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 54123 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078506910 TSecr=0 WS=1 95 20.881504 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 21416 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081598068 TSecr=0 WS=1 96 21.229501 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 41614 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459100360 TSecr=0 WS=1 97 21.363471 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 55403 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458647496 TSecr=0 WS=1 98 21.392270 ee:ff:ff:ff:ff:ff Xensourc_01:07:37 ARP 42 Who has 10.145.24.224? Tell 10.145.27.253 99 21.392285 Xensourc_01:07:37 ee:ff:ff:ff:ff:ff ARP 42 10.145.24.224 is at 00:16:3e:01:07:37 100 21.455882 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 57235 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077432660 TSecr=0 WS=1 101 21.715636 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 22874 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459877968 TSecr=0 WS=1 102 21.858524 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 60927 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080380044 TSecr=0 WS=1 103 22.702850 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 54123 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078508912 TSecr=0 WS=1 104 23.774167 100.61.32.128 10.145.24.224 TCP 74 45531 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458884904 TSecr=0 WS=1 105 23.774425 172.31.107.31 10.145.24.224 TCP 64 80 → 58710 [PSH, ACK] Seq=1 Ack=823 Win=5202 Len=10 106 23.788375 10.145.24.224 172.31.107.31 TCP 60 58710 → 80 [PSH, ACK] Seq=823 Ack=11 Win=1424 Len=6 107 23.788479 172.31.107.31 10.145.24.224 TCP 60 80 → 58710 [ACK] Seq=11 Ack=829 Win=5202 Len=0 108 24.775467 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 45531 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458885906 TSecr=0 WS=1 109 24.836413 100.62.15.128 10.145.24.224 TCP 74 43193 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081602022 TSecr=0 WS=1 110 25.281396 100.61.33.0 10.145.24.224 TCP 74 42227 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459104411 TSecr=0 WS=1 111 25.374915 100.61.32.0 10.145.24.224 TCP 74 56043 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458651507 TSecr=0 WS=1 112 25.402999 100.62.14.128 10.145.24.224 TCP 74 22737 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077436607 TSecr=0 WS=1 113 25.602579 10.145.24.224 8.8.8.8 DNS 137 Standard query 0xb696 A cms-cloudmonitor.cn-hangzhou-zwynet-am360001-a.internet.cloud-inner.zj.gov.cn 114 25.676354 8.8.8.8 10.145.24.224 DNS 153 Standard query response 0xb696 A cms-cloudmonitor.cn-hangzhou-zwynet-am360001-a.internet.cloud-inner.zj.gov.cn A 172.31.107.172 115 25.676509 10.145.24.224 172.31.107.172 TCP 74 37896 → 80 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=87781427 TSecr=0 WS=128 116 25.676652 172.31.107.172 10.145.24.224 TCP 66 80 → 37896 [SYN, ACK] Seq=0 Ack=1 Win=29200 Len=0 MSS=1440 SACK_PERM=1 WS=512 117 25.676668 10.145.24.224 172.31.107.172 TCP 54 37896 → 80 [ACK] Seq=1 Ack=1 Win=29312 Len=0 118 25.676699 10.145.24.224 172.31.107.172 TCP 264 37896 → 80 [PSH, ACK] Seq=1 Ack=1 Win=29312 Len=210 [TCP segment of a reassembled PDU] 119 25.676841 172.31.107.172 10.145.24.224 TCP 60 80 → 37896 [ACK] Seq=1 Ack=211 Win=30720 Len=0 120 25.676911 172.31.107.172 10.145.24.224 HTTP 79 HTTP/1.1 100 Continue 121 25.676916 10.145.24.224 172.31.107.172 TCP 54 37896 → 80 [ACK] Seq=211 Ack=26 Win=29312 Len=0 122 25.676949 10.145.24.224 172.31.107.172 TCP 7254 37896 → 80 [ACK] Seq=211 Ack=26 Win=29312 Len=7200 [TCP segment of a reassembled PDU] 123 25.676955 10.145.24.224 172.31.107.172 TCP 7254 37896 → 80 [ACK] Seq=7411 Ack=26 Win=29312 Len=7200 [TCP segment of a reassembled PDU] 124 25.677123 172.31.107.172 10.145.24.224 TCP 60 80 → 37896 [ACK] Seq=26 Ack=14611 Win=59392 Len=0 125 25.677148 10.145.24.224 172.31.107.172 HTTP 10813 POST /agent/metrics/putLines HTTP/1.1 (text/plain) 126 25.677290 172.31.107.172 10.145.24.224 TCP 60 80 → 37896 [ACK] Seq=26 Ack=25370 Win=80896 Len=0 127 25.691532 172.31.107.172 10.145.24.224 HTTP 179 HTTP/1.1 200 OK 128 25.691561 172.31.107.172 10.145.24.224 TCP 60 80 → 37896 [FIN, ACK] Seq=151 Ack=25370 Win=80896 Len=0 129 25.691637 10.145.24.224 172.31.107.172 TCP 54 37896 → 80 [FIN, ACK] Seq=25370 Ack=152 Win=29312 Len=0 130 25.691746 172.31.107.172 10.145.24.224 TCP 60 80 → 37896 [ACK] Seq=152 Ack=25371 Win=80896 Len=0 131 25.744127 100.61.33.128 10.145.24.224 TCP 74 58724 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459881996 TSecr=0 WS=1 132 25.767287 100.62.15.0 10.145.24.224 TCP 74 24192 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080383952 TSecr=0 WS=1 133 25.837513 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 43193 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081603024 TSecr=0 WS=1 134 26.281452 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 42227 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459105412 TSecr=0 WS=1 135 26.375452 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 56043 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458652508 TSecr=0 WS=1 136 26.403882 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 22737 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077437608 TSecr=0 WS=1 137 26.745637 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 58724 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459882998 TSecr=0 WS=1 138 26.768487 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 24192 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080384954 TSecr=0 WS=1 139 26.771373 100.62.14.0 10.145.24.224 TCP 74 22967 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078512980 TSecr=0 WS=1 140 26.781457 100.61.32.128 10.145.24.224 TCP 74 [TCP Retransmission] 45531 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458887912 TSecr=0 WS=1 141 27.772984 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 22967 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078513982 TSecr=0 WS=1 142 27.841644 100.62.15.128 10.145.24.224 TCP 74 [TCP Retransmission] 43193 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2081605028 TSecr=0 WS=1 143 28.285449 100.61.33.0 10.145.24.224 TCP 74 [TCP Retransmission] 42227 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459107416 TSecr=0 WS=1 144 28.379445 100.61.32.0 10.145.24.224 TCP 74 [TCP Retransmission] 56043 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458654512 TSecr=0 WS=1 145 28.407911 100.62.14.128 10.145.24.224 TCP 74 [TCP Retransmission] 22737 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2077439612 TSecr=0 WS=1 146 28.747871 100.61.33.128 10.145.24.224 TCP 74 [TCP Retransmission] 58724 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3459885000 TSecr=0 WS=1 147 28.774440 100.62.15.0 10.145.24.224 TCP 74 [TCP Retransmission] 24192 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2080386960 TSecr=0 WS=1 148 29.774857 100.62.14.0 10.145.24.224 TCP 74 [TCP Retransmission] 22967 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=2078515984 TSecr=0 WS=1 149 30.685626 100.61.32.128 10.145.24.224 TCP 74 57107 → 8085 [SYN] Seq=0 Win=2920 Len=0 MSS=1460 SACK_PERM=1 TSval=3458891816 TSecr=0 WS=1
从抓包结果中可以看到slb发起syn请求建立连接,但是服务器没有回包。
于是得出如下结论:
1、请求已经到达后端服务器,也就证明slb和服务器之间没有任何安全软件等拦截 2、后端服务器没有回包,从而怀疑是服务器本身的配置导致没有返回确认包
应用是docker服务部署的,所以考虑检查foward转发问题。
如下:
开启foward转发,修改配置文件: /etc/sysctl.conf
新增如下内容:
net.ipv4.ip_forward = 1
开启之后执行命令:sysctl -p,使其生效
[root@172-16-104-15 sysctl.d]# sysctl -a | grep ip_forward net.ipv4.ip_forward = 1 #验证该参数是否生效
最后可以再执行命令:iptables-save显示目前iptabls规则,会发现forward已变更为ACCEPT