TCP doesn't work that way. Timeouts are much longer and SYN should be repeated on the same port. Using a different port suggests the previous try was abandoned..
This is a regular behaviour. You could try to use iptables (or simmilar) to stop the client machine from sending RST (-j DROP instead of -j REJECT) and see what happens then.And after the server tries to respond to the first connection attempt the client sends RST to cancel that first attempt, since it's no longer listening there!!
So why doesn't it happen with the second attempt?Shortly after that the server catches up and replies with SYN/ACK to the second attempt. From that point communication proceeds normally.
There is nothing like "fast enough" with TCP. The initial TCP timeout can often be changed by tweaking system settings, but it's surely bigger than 0.1s. Otherwise you could never connect to lagging or distant servers (connections through a satellite link would also not be possible).I think this is exactly what was happening to the original posters on this thread . For what ever reason, the server I'm connecting with is not responding to the first connection attempt fast enough!!
I suggest you try with different servers. If you were connecting to IIS, it has a well known "feature" of cheating the statistics and you might be experiencing that. But since you're connecting to some java software, it's either the software problem or the operating system. Does the same happen (on the same target box) when using Qt servers from networking examples?The question at this point is.....is the server not responding fast enough or is the connection attempt unreasonable in it's expectations regarding timing? Anyone have thoughts on this? Is the server simply slow or do I need to configure something relative to the socket or Linux or whatever?
Bookmarks