2

I'm getting a connect timed out stacktrace below on first request after less then 5 millisecond although my timeout is configured to be 20000 milliseconds (verified using debug).

this occurs only when the Arp need to be established. (reproducible in my server using arp -d)

machines(client and server): centos6.5 Linux machine (virtual machine) Jvm - Java7

any ideas?

stack trace:

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
Cœur
  • 37,241
  • 25
  • 195
  • 267
Yosefki
  • 383
  • 7
  • 22
  • From tcpdump (btw do not use -A option if not dealing with arp requests - maybe use -n option), your client is sending a RESET just after receiving the SYN/ACK. Maybe your client closes the socket just after sending the SYN (some ignore runtime exception?), and the kernel sends a reset. – Antonio Barbuzzi Sep 03 '14 at 09:00
  • in this case i'm interested in the Arp requests. the exception showed in the question is the only exception i have. I agree that it looks like the client closed the socket but i can't find a reason\evidence for that to happen. – Yosefki Sep 03 '14 at 10:15

0 Answers0