0

How can this be ? netstat shows x 'established' connections from the client to y 'established' connections on the server. Situation stays like this for 10 minutes, then x and y change, then another 10 minutes of stability and so on. Eventually x will equal y many many hours after the experiment has begun, but not the expected value anyway.

Should it matter, client side is a java program, server side is native code. Both ubuntu linuxes. Oh and needless to say, the experiment is a failure.

4
  • What does the network in between consist of? How are the connection counts differing? i.e: is X always => Y (or vice versa)? Are you also checking the server's netstat? Are you expecting a certain amount of connections? Mar 12, 2013 at 23:29
  • network in between ... at least 100 Mbps link ? x >= y usually but I have seen it the other way around too. netstat is the tool that got me these odd results, yes. Should be a certain number of connections indeed.
    – kellogs
    Mar 13, 2013 at 0:03
  • 1
    Are you ever exceeding the expected number of connections? I asked about the network in between as routing and caching may cause some unexpected results, so I was looking for information about the physical network setup. :) Like, do you get the same results if you directly wire the client machine to the server? Mar 13, 2013 at 0:07
  • I see. I am afraid I can not test such setup. At least not momentarilly. Will keep that in mind though.
    – kellogs
    Mar 13, 2013 at 0:31

1 Answer 1

3

If one side closes the connection without signaling that it will be closing you will be left with a Half Open connection.

Intentionally closing only one side of the connection is the way old SYN Flood Denial of Service attacks where performed.

4
  • interesting read. But how is it that they take so long (hours) to get in sync again (if it really happens, I am not really betting a cookie on this). And why do they never end up in the same place as started (x = 20) ? Perhaps there are some sys variables to be adjusting on linux for TCP timeouts ?
    – kellogs
    Mar 12, 2013 at 22:38
  • Maybe you have a program that is constantly dropping connections, and once every few hours it behaves correctly and you have no half open connections. You really need to look at what the connection state is of those 20 connections are. Mar 12, 2013 at 22:40
  • as described, the connections are all in the 'established' state. I can spot in 1 % of my readings 'time_wait' states (only on client side) but I guess that is the only normal part in this mess.
    – kellogs
    Mar 12, 2013 at 22:43
  • I did not realize that when you said "netstat shows x established connections from the client to y established connections" you where actually referring to the ESTABLISHED connection state, not that you just saw that many items listed in netstat. Mar 12, 2013 at 22:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .