虽然我的超时配置为20000毫秒(使用调试验证),但我在第一次请求后得到了一个连接超时堆栈跟踪,但是我的超时配置为20000毫秒(使用调试验证)。
只有在需要建立Arp时才会发生这种情况。 (使用arp -d在我的服务器中可重现)
机器(客户端和服务器):centos6.5 Linux机器(虚拟机) Jvm - Java7
任何想法?
堆栈跟踪:
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
tcp dump:
-sh-4.1$ sudo tcpdump -A host cs-simulator.e4x.com
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:59:39.470342 ARP, Request who-has cs-simulator.e4x.com tell 10.101.5.228, length 28
.........PV.bb
e........
e./
13:59:39.470939 ARP, Reply cs-simulator.e4x.com is-at 00:50:56:8f:20:87 (oui Unknown), length 46
.........PV. .
e./.PV.bb
e....................
13:59:39.470945 IP 10.101.5.228.40618 > cs-simulator.e4x.com.webcache: Flags [S], seq 35114085, win 14600, options [mss 1460,sackOK,TS val 1911239900 ecr 0,nop,wsca
E..<..@.@."&
e..
e./.......e......9............
q.4.........
13:59:39.471125 IP cs-simulator.e4x.com.webcache > 10.101.5.228.40618: Flags [S.], seq 3508638045, ack 35114086, win 14480, options [mss 1460,sackOK,TS val 34000901 scale 7], length 0
E..<..@.@...
e./
e.......!.]...f..8.L..........
..BCq.4.....
13:59:39.471132 IP 10.101.5.228.40618 > cs-simulator.e4x.com.webcache: Flags [R], seq 35114086, win 0, length 0
E..(..@.@...
e..
e./.......f....P....L..
13:59:40.420464 IP cs-simulator.e4x.com.34460 > 10.101.5.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
E..N..@.@...
e./
e.......:RjNt.......... FHEJEOCOEJEBEEDBCOECEGEOEFFECOBM.. ..
13:59:40.671367 IP cs-simulator.e4x.com.34802 > 10.101.5.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
E..N..@.@...
e./
e.......:.88[.......... FHEJEOCNEJEBEEDBCACACACACACACABM.. ..
13:59:40.924606 IP cs-simulator.e4x.com.47101 > 10.101.5.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
E..N..@.@...
e./
e.......:.6#R.......... FHEJEOCNEJEBEEDBCACACACACACACABM.. ..
^C
8 packets captured
12 packets received by filter
0 packets dropped by kernel
-sh-4.1$ nslookup
> 10.101.5.228