0

I'm transfering a file across a LAN using JxtaServerSocket (receiver side) and JxtaSocket (sender side). At first, I send the file name than its size. After that I wait for offset to start sending the file from it. If I start both parts of program locally (on one computer) it works fine, but in case of different computers it doesn't work:

05.04.2011 13:59:03 net.jxta.logging.Logging logCheckedWarning  
WARNING: Line 557 net.jxta.socket.JxtaServerSocket.pipeMsgEvent()
backlog queue full, connect request dropped  
05.04.2011 13:59:03 net.jxta.logging.Logging logCheckedInfo
INFO: Line 115 net.jxta.impl.pipe.InputPipeImpl.<init>()
Creating InputPipe for urn:jxta:uuid-C5D686304E5A4916A943F1F4D0FD649892EAC01ED6644C4DA82ADA0A22F4C7B004 of type JxtaUnicast with listener  
05.04.2011 13:59:03 net.jxta.logging.Logging logCheckedInfo  
INFO: Line 356 net.jxta.socket.JxtaSocket.<init>()
New socket : net.jxta.socket.JxtaSocket@10175206[uuid-C5D686304E5A4916A943F1F4D0FD64988A0B5A3B55C14246824C9A3325E18D2204/uuid-C5D686304E5A4916A943F1F4D0FD649892EAC01ED6644C4DA82ADA0A22F4C7B004] OPEN : i  R  B  C   
05.04.2011 13:59:03 org.mopsproject.core.net.transfer.FileReceiver run  
INFO: New socket connection accepted  
05.04.2011 13:59:03 org.mosprpoject.core.net.transfer.FileReceiver.ConnectionHandler ConnectionHandler(JxtaSocket socket)  
INFO: Method started.  
05.04.2011 13:59:03 org.mopsproject.core.net.transfer.FileReceiver run  
INFO: Waiting for connections  
05.04.2011 13:59:03 org.mopsproject.core.net.transfer.FileReceiver getTargetFile  
INFO: filename : 550e8400-e29b-41d4-a716-446655441234.xml  
05.04.2011 13:59:03 net.jxta.logging.Logging logCheckedInfo  
INFO: Line 1137 net.jxta.impl.util.pipe.reliable.ReliableOutputStream$Retransmitter.<init>()   
STARTED Reliable Retransmitter, RTO = 60000  
05.04.2011 13:59:04 org.mosprpoject.core.net.transfer.FileReceiver.ConnectionHandler sendAndReceiveData(JxtaSocket socket)  
SEVERE: Read timeout reached  
       java.net.SocketTimeoutException: Read timeout reached
    at net.jxta.impl.util.pipe.reliable.ReliableInputStream.dequeueMessage(ReliableInputStream.java:569)
    at net.jxta.impl.util.pipe.reliable.ReliableInputStream.local_read(ReliableInputStream.java:702)
    at   net.jxta.impl.util.pipe.reliable.ReliableInputStream.read(ReliableInputStream.java:309)
    at   java.io.DataInputStream.readFully(Unknown Source)
    at java.io.DataInputStream.readLong(Unknown Source)
    at org.mopsproject.core.net.transfer.FileReceiver$ConnectionHandler.sendAndReceiveData(FileReceiver.java:310)
    at org.mopsproject.core.net.transfer.FileReceiver$ConnectionHandler.run(FileReceiver.java:409)
    at java.lang.Thread.run(Unknown Source)

There is one interesting thing that the receiver gets the file name but nothing else. I would like to know what are the reasons for this strange thing to happen? On the other hand, it might be JXTA's fault I suppose.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Eugene
  • 91
  • 2
  • 6
  • Which version of JXTA are you using? If your application works on a single device, then the issue is most probably a) in the configuration of the devices or firewalls, or b) in the code handling JXTA sockets. Can you share the code you are using? – Jérôme Verstrynge Apr 06 '11 at 08:57

1 Answers1

0

I had a discussion with Eugene on the JXSE/JXTA email list. One of his stack trace seemed to indicate that he was using a ADHOC configuration (which only uses multicasting) in a scenario requiring TCP/HTTP connections. I have advised to use EDGE / RDV configurations instead. I have not received feedback since. I am assuming this solved his issue...

Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453