-
-
Notifications
You must be signed in to change notification settings - Fork 939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.InvalidOperationException: The session is not open. #369
Comments
The server probably closed the channel. If you have a client (eg. SftpClient) that has successfully established an SSH connection to a given server, the server may very well reject subsequent requests (eg. a request to open a channel, or a sftp subsystem request). |
Unfortunately, I also get such annoying mistakes. |
I am also getting the same error. Any solutions? |
Does anyone know how to solve this? |
I also encountered the same problem |
Do you still use 2016.1.0.0? |
@WojciechNagorski Hello, my SSH.NET version is 2020.0.1 |
Any updates on this issue @WojciechNagorski? I'm experiencing this in 2020.0.2 when using an instance of an SftpClient inside a Parallel.ForEach() loop to upload files.
|
Feedback on version "2024.1.0": |
Hi
I am running on renci latest version 2016.1.0.0
Trying to upload/poll/download and delete in sequence using 4 different static SFTP connections for these individual operations. This all happens in multi-threaded environment with a throttle of 100 parallel threads.
The dispose happens at once, only when all the threads are finished.
Problem : After a few files I start getting the following error in either of these operations (upload/poll/download/delete).
Following is the GetInstance method to create the 4 static connection on first request:
And here is the sample Upload method that I have written. Trying for 10 retries:
This happens intermittently after some time. Have tried playing around with properties like ConnectionInfo.MaxSessions, KeepAliveInterval, ConnectionInfo.Timeout. But no luck.
And the confusion is the the _edmSftpClient[instanceID].IsConnected property evaluates to true while I get this error.
Can you please suggest where am I going wrong. Could it be SFTP server setting issue or a code bug.
The text was updated successfully, but these errors were encountered: