Our Production Octopus Server went down. When checked the logs and in windows event viewer, we got following error trail. Any clue:
ERROR An error occurred.
Renci.SshNet.Common.SshConnectionException: An existing connection was forcibly closed by the remote host.
—> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
at Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at Renci.SshNet.Session.TrySocketRead(Byte[] buffer, Int32 offset, Int32 length)
at Renci.SshNet.Session.ReceiveMessage()
at Renci.SshNet.Session.MessageListener()
— End of inner exception stack trace —
2021-07-13 15:22:39.0174 2020 779 FATAL Unhandled AppDomain exception occurred: Safe handle has been closed.
Object name: ‘SafeHandle’.
System.ObjectDisposedException
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
at Interop.Kernel32.SetEvent(SafeWaitHandle handle)
at System.Threading.EventWaitHandle.Set()
at Renci.SshNet.SshCommand.Session_ErrorOccured(Object sender, ExceptionEventArgs e)
at Renci.SshNet.Session.RaiseError(Exception exp)
at Renci.SshNet.Session.MessageListener()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
System.ObjectDisposedException: Safe handle has been closed.
Object name: ‘SafeHandle’.
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
at Interop.Kernel32.SetEvent(SafeWaitHandle handle)
at System.Threading.EventWaitHandle.Set()
at Renci.SshNet.SshCommand.Session_ErrorOccured(Object sender, ExceptionEventArgs e)
at Renci.SshNet.Session.RaiseError(Exception exp)
at Renci.SshNet.Session.MessageListener()
at System.Threading.ThreadPoolWorkQueue.Dispatch()