SSHException Channel was closed intermittent behavior
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 4.4k
- 派生
- 993
- 平均合并
- 9 天 21 小时
- 30 天内合并 PR
- 1
描述
We are connecting to a client SFTP and prior to this week had nothing but successful transactions.
We are now experiencing intermittent exceptions. We are calling this functionality from an Azure function, and the files are streamed from Azure storage, but i don't believe that has any impact on the issue.
I have tried both synchronous and asynchronous methods and had success locally, and on majority of live test cases, but when it fails, I don't have an idea of what the problem may be. Any thoughts would be much appreciated.
My code is below:
sftpClient.Connect();
var uploadPath = $"{sftpFolder}/{fileName}";
sftpClient.UploadFile(stream, uploadPath);
sftpClient.Disconnect();
Alternatively, I tried instead:
sftpClient.Connect();
var uploadPath = $"{sftpFolder}/{fileName}";
var returnVal = sftpClient.BeginUploadFile(stream, uploadPath, new AsyncCallback(x => FileTransferred(x, log, fileName, uploadPath)));
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从已报告的 Connect()、UploadFile() 和 BeginUploadFile() 调用开始,将 Azure Function 中的间歇性失败与本地运行成功的情况进行比较。记录 SSHException 的完整上下文以及连接或传输条件;完成标准是确定一个可复现的原因,并记录或验证针对间歇性通道关闭的修复方案。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, csharp
- 领域
- cloud, networking
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100