socketException + sftp = deadlock ?
Bernardo F Costa <[email protected]>
| Newsgroups | gmane.comp.java.sshtools.user |
|---|---|
| Message-ID | <[email protected]> |
Hello !
I recently tried to make some operations with sftp of
j2ssh and a server which often resets the connection.
Every time a connection is reset, my j2ss application
hangs. If the connection is not resetted i am able to
do whatever operation of sftp and the close it. I am
becoming suspicious about sftp. If the same situation
occurs on a SessionChannelClient, I am able to
overcome it closing the connection and re-opening it
without hang ups. Have anyone had this kind of problem
with sftp ?
Looking inside the sources, I have found that it hangs
listening to a incoming message that possibly will
never be sent, for its Channel has been closed, when
the "Connection reset" exception is raised. But I am
not sure if the incoming message will or not be send.
At sources, this is placed in SftpMessageStore class,
in method getMessage(). Since the problem arises at
transport protocol, when it fails, shouldn't it send a
"disconnect message" in this kind of situation ?
Please feel free to post your opinion/ideas because
mine are becoming useless...
This is the exception that causes the hang up:
[Transport protocol 38 - Jan 08 17:48:29] ERROR
(TransportProtocolCommon.java) - The Transport
Protocol thread failed
java.net.SocketException: Connection reset
at
java.net.SocketInputStream.read(SocketInputStream.java:168)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at
com.sshtools.j2ssh.transport.TransportProtocolInputStream.readBufferedData(TransportProtocolInputStream.java:171)
at
com.sshtools.j2ssh.transport.TransportProtocolInputStream.readMessage(TransportProtocolInputStream.java:235)
at
com.sshtools.j2ssh.transport.TransportProtocolCommon.processMessages(TransportProtocolCommon.java:1349)
at
com.sshtools.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(TransportProtocolCommon.java:970)
at
com.sshtools.j2ssh.transport.TransportProtocolCommon.run(TransportProtocolCommon.java:377)
at java.lang.Thread.run(Thread.java:595)
__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV