System.ObjectDisposedException on SSH Test Connection

Whenever I click Test connection with a Storage Type of SFTP (SSH) the server crashes. If I run /Applications/Duplicati.app/Contents/MacOS/duplicati-server manually I see the following before the process crashes …

[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Safe handle has been closed
  at System.Runtime.InteropServices.SafeHandle.DangerousAddRef (System.Boolean& success) [0x0001c] in <bb7b695b8c6246b3ac1646577aea7650>:0 
  at System.Threading.NativeEventCalls.SetEvent (Microsoft.Win32.SafeHandles.SafeWaitHandle handle) [0x00002] in <bb7b695b8c6246b3ac1646577aea7650>:0 
  at System.Threading.EventWaitHandle.Set () [0x00000] in <bb7b695b8c6246b3ac1646577aea7650>:0 
  at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle.Set()
  at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCompleted (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) [0x0000f] in <502177f7126d48e4be01a83c8cdb4c79>:0 
  at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted (System.Net.Sockets.SocketAsyncEventArgs e) [0x0000e] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at System.Net.Sockets.SocketAsyncEventArgs.Complete () [0x00000] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at System.Net.Sockets.Socket+<>c.<.cctor>b__308_3 (System.IAsyncResult ares) [0x00057] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at System.Net.Sockets.SocketAsyncResult+<>c.<Complete>b__27_0 (System.Object state) [0x0000b] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <bb7b695b8c6246b3ac1646577aea7650>:0 
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <bb7b695b8c6246b3ac1646577aea7650>:0 
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <bb7b695b8c6246b3ac1646577aea7650>:0 

I am able to SSH to the server without issue. I’ve specified a working ssh-keyfile. I’m using …

  • MacOS High Sierra 10.13.5 (the SSH server is the same, but I’ve tested a Linux server as well with the same results)
  • Duplicati - 2.0.3.3_beta_2018-04-02
  • Mono JIT compiler version 5.10.1.47 (2017-12/8eb8f7d5e74 Fri Apr 13 20:18:12 EDT 2018

I’m using the same setup on other machines on the network without issue. However they are using Duplicati - 2.0.2.1_beta_2017-08-01.

Help!

Frank

Hi @FrankieG, welcome to the forum!

That’s not an error I’ve run into myself, though I haven’t done a lot of backups on MacOS…

Is downgrading to 2.0.2.1 beta on the problem machine an option to see if we can isolate the issue to a specific version of Duplicati or to the machine in general?

That’s what I did and it works :slight_smile:

Mono is at 5.0.0.100
Duplicati is at Duplicati - 2.0.2.1_beta_2017-08-01

Great! So did mono downgrade from 5.10.1.47 to 5.0.0.100 when you downgraded Duplicati or did that happen separately?

I’m asking because, while it’s good things are working correctly for you again, we don’t know if the “fix” was downgrading Duplicati, mono, or both…

I manually downgraded Mono to be the same version as a machine that worked.