Re: Channel/Seesion Closed
Ziv <[email protected]>
| Newsgroups | gmane.comp.java.sshtools.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Bernardo, Thanks for the quick reply. My problem is not exactly as the one you describe. I am able to communicate with the remote server for some time using the same session, but after some time, when I read from the session's input stream, I receive an answer shorter than the answer I expect (meaning, not all the bytes are transferred from the server to me), and after that, when I try to write to the output stream, I get the IOException described below (before this exception I get no other exception). Please let me know if you know of something that could be the reason for this behaviour. Thanks, Ziv Bernardo F Costa wrote: > > I also had the same problem when I started using > sshTools to execute remote comands. It looks like it's > default behaviour is to close the SessionChannel after > the remote command has executed and it's output > available, although the connection is still open. So, > when programming, I had to open a new SessionClient > everytime Iwante to execute a remote command. > One other thing that could have happenned is the > closing of all SessionChannels after an unexpected > exception. > > --- Ziv <[email protected]> escreveu: > >> >> Hello, >> >> I use the SSHTools package, and I encountered a >> weired thing: >> After some time of having an open session, I try to >> write something to the >> session's output stream, and I get an IOException, >> with the folowing error >> message: >> java.io.IOException: The connection has been closed >> [session] >> Since I am not closing the session nor the channel, >> I started to think that >> the channel or session have some defenition >> regarding an interval after >> which it closes automatically. Is this correct? I >> was not able to find a >> clue for this in the source code. >> >> Thanks, >> >> Ziv >> -- > > > __________________________________________________ > Fale com seus amigos de graça com o novo Yahoo! Messenger > http://br.messenger.yahoo.com/ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sshtools-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sshtools-users > > -- View this message in context: http://www.nabble.com/Channel-Seesion-Closed-tf3181284.html#a8841400 Sent from the SSHtools - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sshtools-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sshtools-users