JxtaServerSocket问题
我正在使用 JxtaServerSocket
(接收方)和 JxtaSocket
(发送方)通过 LAN 传输文件。首先,我发送文件名而不是其大小。之后,我等待 offset 开始从中发送文件。如果我在本地(在一台计算机上)启动程序的两个部分,它可以正常工作,但如果在不同的计算机上,它就不起作用:
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)
有一件有趣的事情,接收器获取文件名,但没有其他信息。 我想知道到底是什么原因导致这种奇怪的事情发生呢? 另一方面,我想这可能是 JXTA 的错。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我与 Eugene 在 JXSE/JXTA 电子邮件列表上进行了讨论。他的堆栈跟踪之一似乎表明他在需要 TCP/HTTP 连接的场景中使用了 ADHOC 配置(仅使用多播)。我建议改用 EDGE / RDV 配置。从那以后我还没有收到反馈。我认为这解决了他的问题......
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...