简介:
环境的搭建过程,与应用case处理不是同一组人处理 。出现问题往往不容易查到原因,下面来处理一个类似的实例。
应用信息:
1.应用实例:
nts-server1234 10.12.21.3 Ins IP 10.12.22.3 F5 IP 10.12.194.130 主机 IP 端口 30793
2.F5信息
10.12.14.16 vs_nts-prms_https_WII_PrdService 443
Trouble Shooting 过程:
第一步:浏览器打开,一直在转,很久之后超时
http://nts-prms.blog.mreald.com/PRMS 域名解析了吗: ping nts-prms.blog.mreald.com PING nts-prms.blog.mreald.com (10.12.14.16) 56(84) bytes of data. 64 bytes from 10.12.14.16: icmp_seq=1 ttl=252 time=0.810 ms 64 bytes from 10.12.14.16: icmp_seq=2 ttl=252 time=0.933 ms
第三步:访问单独应用:正常
[wls81@blog-mreald-com ~]$ wget -O- 10.12.21.3:30793/PRMS --2015-05-29 19:50:58-- http://10.12.21.3:30793/PRMS Connecting to 10.12.212.33:30793... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://10.12.212.33:30793/PRMS/ [following] --2015-05-29 19:50:58-- http://10.12.212.33:30793/PRMS/ Connecting to 10.12.212.33:30793... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://10.12.212.33:30793/PRMS/login;WLS_HTTP_BRIDGE=V4bfVySCDmJRTh8jrTYKtF8Jf8Gp827TJtZcpDRzJrKRp06FL0C1!-1184844728 [following] --2015-05-29 19:50:58-- http://10.12.212.33:30793/PRMS/login;WLS_HTTP_BRIDGE=V4bfVySCDmJRTh8jrTYKtF8Jf8Gp827TJtZcpDRzJrKRp06FL0C1!-1184844728 Connecting to 10.12.212.33:30793... connected. HTTP request sent, awaiting response... 200 OK Length: 215 [text/html] Saving to: `STDOUT' <script id="script_umlogin" language="javascript" ssl="off" sso="on" src="http://10.12.212.33:30793/PRMS/umlogin/login.js" umbaseurl="http://um-selfservice.blog.mreald.com" title="?°????з?????í??"></script> 100%[==================================================================================================================>] 215 --.-K/s in 0s 2015-05-29 19:50:58 (20.5 MB/s) - `-' saved [215/215]
第四步:定位在F5上面
查看F5配置,没发现不对 测试环境能正常使用,对比F5 ,没异常
但发现一点 F5上面只有In 数据,没有Out数据,可能不在F5配置上
第五步: F5的路由
查看有哪些路由表 [root@blog-mreald-com ~]# cat /etc/iproute2/rt_tables 255local 254main 253default 0unspec 100f5 120gw 110f5elis 130 f5-common 查看F5 IP所在路由表: ip rule list |grep 10.12.22.3 1:from 10.12.22.3 lookup f5-common 查看f5-common对应的路由: ip route list table f5-common 10.12.216.0/22 dev bond2 scope link default via 10.12.218.243 dev bond2 得知通过网关 10.12.218.243 但所在F5 的 ”Self IPs“ 没有这个IP 查看f5 对应的路由: ip route list table f5 10.33.104.60 via 10.12.216.200 dev bond2 10.33.104.61 via 10.12.216.200 dev bond2 10.12.216.0/22 dev bond2 scope link 10.12.216.0/21 dev bond2 scope link default via 10.12.216.3 dev bond2
所在F5 ”Self IPs“上面有 10.12.216.3 ,是F5路由配置错误!
第六步:改F5路由网关、与配置文件
[root@blog-mreald-com ~]# ip rule ls |grep 10.12.22.3 1:from 10.12.22.3 lookup f5-common [root@blog-mreald-com ~]# ip rule del from 10.12.22.3 lookup f5-common [root@blog-mreald-com ~]# ip rule add from 10.12.22.3 lookup f5 pre 1 [root@blog-mreald-com ~]# ip rule ls |grep 10.12.22.3 1:from 10.12.22.3 lookup f5 [root@blog-mreald-com ~]# vi2 /path/nts-aa-prd.conf
F5原理:
http://wenku.baidu.com/view/4c58060c4a7302768e9939b5.html