Skip to main content

JXTASocket getting closed

6 replies [Last post]
ashmaurya
Offline
Joined: 2005-10-12
Points: 0

We have a node that's behind a firewall and had a network administrator allow open the RDV port. Now, the node seems to correctly startup and register with the RDV but after a minute, I see a close request in the log file (see below). It seems like SACKs aren't getting sent in a timely fashion.

Can anyone tell me what could be causing this? We are checking to make sure that the firewall allows all TCP traffic and not just HTTP.

Thanks,

Ash

---
16:38:27,503 DEBUG JXTA Reliable Retransmiter for lastAccessed=1189607846887 net.jxta.impl.util.pipe.reliable.ReliableOutputStream - RETRANS : SACK retrans 60601ms ago
16:38:27,503 DEBUG JXTA Reliable Retransmiter for lastAccessed=1189607846887 net.jxta.impl.util.pipe.reliable.ReliableOutputStream - RETRANS : SACK retrans 60601ms ago
16:38:27,503 DEBUG JXTA Reliable Retransmiter for lastAccessed=1189607846887 net.jxta.impl.util.pipe.reliable.ReliableOutputStream - RETRANS : lastAccessed=1189607846887 idle for 60616
16:38:27,503 DEBUG JXTASocketListener1-1 net.jxta.endpoint.Message - Modification to net.jxta.endpoint.Message@32881237(1){103}
16:38:27,503 DEBUG JXTA Reliable Retransmiter for lastAccessed=1189607846887 net.jxta.impl.util.pipe.reliable.ReliableOutputStream - RETRANS : lastAccessed=1189607846887 idle for 60616
16:38:27,503 DEBUG JXTASocketListener1-1 net.jxta.endpoint.Message - Modification to net.jxta.endpoint.Message@32881237(1){103}
16:38:27,534 DEBUG JXTASocketListener1-1 net.jxta.endpoint.Message - Added JXTASOC::close/net.jxta.endpoint.StringMessageElement@996209793 to net.jxta.endpoint.Message@32881237(1){103}
16:38:27,534 DEBUG JXTASocketListener1-1 net.jxta.endpoint.Message - Added JXTASOC::close/net.jxta.endpoint.StringMessageElement@996209793 to net.jxta.endpoint.Message@32881237(1){103}
16:38:27,534 DEBUG JXTASocketListener1-1 net.jxta.socket.JxtaSocket - Sending a close request
16:38:27,534 DEBUG JXTASocketListener1-1 net.jxta.socket.JxtaSocket - Sending a close request

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12
Points: 0

Is it possible that the JxtaSocket object is being GC'd?

I don't see how it would be closed after a minute of opening. provide more info about time lines and usage, it may shed more info.

ashmaurya
Offline
Joined: 2005-10-12
Points: 0

The same code runs fine on several other machines. Just this one is posing the issue. I've rechecked the code too and we do hold on to the JxtaSocket so it can't be getting GC'ed.

The test scenario is as follows:
1. Bring up node
2. Wait till it successfully connects to RDV
3. Initiate a JXTASocket request from RDV node

The request never returns and eventually throws a timeout exception. We see "Added JXTASOC::close" messages in the log which we don't see on any other node.

I've attached the much more of the logfile in case I didn't catch something...

Thanks for your help.

hamada
Offline
Joined: 2003-06-12
Points: 0

do you see the close on the server side, and the connection timeout on the client side?

If so, then improving JxtaServerSocket.accept(), as we did in JxtaServerPipe, would certainly improve this situation.

To give a little background, currently connection requests are processed by the thread calling accept, which can lead to back logs, especially with slow connections, which sometimes manifests in connections accepted on server side, and discarded on the client side.

In JxtaServerPipe, connection requests are processed by thread delivering the connection request, and connections are simply inserted into a queue which accept is waiting on. provides for a much scalable and resilient mechanism.

ashmaurya
Offline
Joined: 2005-10-12
Points: 0

The attached log file is from the server node and I see it receiving a close request.

17:45:16,542 DEBUG QuotaListenerThread net.jxta.socket.JxtaSocket - Received a close request

I also failed to mention that we are running version 2.3.6 so I'm sure there could be updates we could use. I'll look at the work done on JxtaServerPipe.

Does the issue you describe also help explain the long SACK retransmits?

hamada
Offline
Joined: 2003-06-12
Points: 0

The moment I saw "QuotaListenerThread" it was a big flag, as in we are talking apples and oranges :). Actually not quite that different, however I strongly encourage you to migrate to 2.5, reliability and performance has greatly improved, and it would be pretty difficult (if not pointless) to try figure out what caused the problem in 2.3.6, as I know of several bugs which have been addressed which are directly related to JxtaSocket and the reliability layer.

So, give 2.5 a try and let us know of your experience and progress.

ashmaurya
Offline
Joined: 2005-10-12
Points: 0

Thanks.

We held back upgrading for a while because we heard a lot of issues with 2.4 as there were several major improvements in the works. Then other, more pressing issues with our own product kept us from finding the time to upgrade.

Now that enough time has passed, I'm sure 2.5 is stable. I'll give it a go and let you know what we find.