tags:

views:

77

answers:

1

Hi,

I'm transfering a file across a LAN(using JxtaSocket in case you heard about it) and I receive:

java.net.SocketTimeoutException: Failed to receive close ack from remote connection. at net.jxta.socket.JxtaSocket.close(JxtaSocket.java:1046)

I would like to know what are the reasons this would happen in the first place. I'm receiving this exception at a regular pace, after I send one file(which is 2.9 mb). All other files are under 1 Mb and work fine.

On the other hand, it might be JXTA's fault I suppose.

Any response will be highly appreciated!

A: 

TCP is a complicated protocol.

One part of it is that when clients are shutting down their connection the requesting side (the side that initially tried to close) has to wait for a close acknowledgment from the other side, to make sure that the remote side knows that we are closing down the connection. Unfortunately it is common for the shutdown handshake not to occur properly (sometimes clients just close instead of properly going through the handshake). In practise this doesn't really matter because all the important communication is done.

so long story short, what you are most likely seeing here is a misbehaving client, but i wouldn't worry about it.

Wikipedia has a good discussion of the TCP connection termination protocol

luke