- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 958
Open
Labels
Description
I've got an intermittent crash I'd like to track down a bit better:
Unhandled Exception: Renci.SshNet.Common.SshException: Failed to open a channel after 10 attempts.
at Renci.SshNet.Channels.ChannelSession.Open()
at Renci.SshNet.ScpClient.Download(String filename, FileInfo fileInfo)
at AtlasSSH.SSHConnection.CopyRemoteFileLocally(String lx, FileInfo localFile, Action`1 statusUpdate, Func`1 failNow)
at AtlasWorkFlows.Locations.PlaceLinuxRemote.CopyFromRemoteToLocal(String dsName, String[] files, DirectoryInfo ourpath, Action`1 statusUpdate, Func`1 failNow)
at AtlasWorkFlows.Locations.PlaceLocalWindowsDisk.CopyFromSCPTarget(IPlace origin, Uri[] uris, Action`1 statusUpdate, Func`1 failNow)
I can see the spot where this error occurs in the source code. But the reasons for the error or failure to open seem to fail. This failure occurs after 15 or 20 connections are opened (and I think closed) to the same machine. And it doesn't always happen.
How can I better track down what is causing this failure?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
drieseng commentedon Sep 24, 2017
Right now, we do not capture the information that a remote host provides when it rejects opening a channel session.
We should capture that information, and include it in the exception we raise after
ConnectionInfo.RetryAttempts
failed attempts.[-]What causes 10 attempts to open a channel fail?[/-][+]Information provided by remote host is not captured when channel session is rejected[/+]drieseng commentedon Sep 24, 2017
@gordonwatts Until I fix this at our end, you have two options:
ChannelSession(OnOpenFailure(uint reasonCode, string description, string language)
in SSH.NET to capture and log that info.gordonwatts commentedon Sep 25, 2017
Thanks!
drieseng commentedon Sep 26, 2017
@gordonwatts Is this blocking you? Have you tried my suggestions above?
gordonwatts commentedon Sep 27, 2017
Thanks, no. I re-run a few times and it gets through. I can modify the source so it captures the code and build a myget nuget package to debug what is going on. So, no worries.