Skip to content

Connecting to swftp server using ssh ftp throws session is down error when using JSch library #44

@sarathambadas

Description

@sarathambadas

Hi
I am connecting to swftp using ssh ftp from a java program using JCch libraries. It works for some time and after that it throws session is down error. The SFTP server is running on softlayer

Caused by: com.jcraft.jsch.JSchException: session is down
at com.jcraft.jsch.Channel.sendChannelOpen(Channel.java:728)
at com.jcraft.jsch.Channel.connect(Channel.java:151)
at com.jcraft.jsch.Channel.connect(Channel.java:145)
at com.approuter.module.ftp.protocol.SftpConnectionImpl.(SftpConnectionImpl.java:108)
... 23 more

We try to reestablish a new session by cleaning of the resources (calling disconnect) but still face the same error even after retrying many number of times. Again suddenly it starts working after couple of hours.
Another thing is when this error occurs, it affects other clients as well who use the same credentials.

Can we know what is happening on the server side and how sessions are handled?
Is it possible to reuse a session once it gets corrupt/invalid. All channels returned by this session fail to work.

has anybody seen this issue?

Thanks
Sarath

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions