Octopus Server went down

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()

Hi tejpal.chohan,

Thank you for reaching out to us with your query.

It looks like the error occurred as a SSH connection was ungracefully disconnected, but there isn’t enough information to say what caused the disconnection. However, based on prior experience, the An existing connection was forcibly closed by the remote host. message usually indicates a network issue. It’s possible that this was a one-off glitch causing the system to get into an unexpected state that was caused by a communication problem.

As it happens we’ve recently updated our SSH libraries to a newer version so it’s possible that whatever issue did cause this error is already fixed. It would therefore be worth considering upgrading your installation of Octopus Server to the latest version to ensure you have all the latest fixes and improvements.

I hope this is helpful. Please let me know if you have any questions.

Best Regards,

Charles

Hi @charles.hague

Not completely sure what had happened there as we could not reproduced the issue again. High possibility of one-off glitch.
Also we will take into consideration of upgrading to latest version of Octopus. For now happy to close this ticket.

Kind Regards
Tejpal

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.