Error getting response stream (readasync)

Hi All,
I am getting the following error when attempting to back up…

Error getting response stream (ReadAsync): ReceiveFailure A call to SSPI failed, see inner exception.

Host is a Mac running 10.12.6
Backing up to Backblaze B2
Duplicati v 2.0.4.23
data volume is around 8tb with 4tb currently backed up

I have no idea what this means, or how to diagnose and fix it, so any help would be very welcome. Thank you

Welcome to the forum @aconnor

It would be helpful if you could get more of the error details, perhaps via About --> Show log --> Live --> Error. Google thinks this is a problem in TLS (but without details it’s hard to say which sort of error it is).

Error from mono: SSLV3_ALERT_HANDSHAKE_FAILURE has ideas for Duplicati, and a sample error.

Secure Socket Layer (SSL) / Transport Layer Security (TLS) gives some advice from the Mono project.

It would probably be good to be on a not-too-old mono (mono --version) should be at least 4.8, and a requirement for at least version 5 will be in a Duplicati Beta whenever the new Beta can get pushed out.

Mono for macOS is available as a Mac Package (.pkg)

Hi @ts678,
Thanks for your reply, here are my results. Mono reports

Mono JIT compiler version 5.12.0.301 (2018-02/4fe3280bba1 Fri Jul 20 08:25:42 EDT 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. xxxmono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(3.6.0svn-mono-master/8b1520c8aae)
GC: sgen (concurrent by default)

Just in case, I updated to Mono 6.4.0 Stable

  • This time when running the backup, there was a log message about certs-
    10 Nov 2019 3:53 PM: No certificates found, you can install some with one of these commands: cert-sync /etc/ssl/certs/ca-certificates.crt #for Debian based systems cert-sync /etc/pki/tls/certs/ca-bundle.crt #for RedHat derivatives curl -O xxxcurl.haxx.se/ca/cacert.pem; cert-sync --user cacert.pem; rm cacert.pem #for MacOS Read more: xxx.mono-project.com/docs/about-mono/releases/3.12.0/#cert-sync

So I ran the command-
curl -O https://curl.haxx.se/ca/cacert.pem; cert-sync --user cacert.pem; rm cacert.pem

Which appeared to succeed and add 137 new trust certs.

Finally got the full error, here it is-

{“ClassName”:“System.Net.WebException”,“Message”:“Error getting response stream (ReadAsync): ReceiveFailure A call to SSPI failed, see inner exception.”,“Data”:null,“InnerException”:{“ClassName”:“System.Security.Authentication.AuthenticationException”,“Message”:“A call to SSPI failed, see inner exception.”,“Data”:null,“InnerException”:{“ClassName”:“Mono.Security.Interface.TlsException”,“Message”:"Unknown Secure Transport error BadRecordMac'.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Mono.AppleTls.AppleTlsContext.CheckStatusAndThrow (Mono.AppleTls.SslStatus status, Mono.AppleTls.SslStatus[] acceptable) [0x000b1] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n at Mono.AppleTls.AppleTlsContext.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0009f] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n at Mono.Net.Security.MobileAuthenticatedStream.ProcessRead (Mono.Net.Security.BufferOffsetSize userBuffer) [0x00011] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessRead(Mono.Net.Security.BufferOffsetSize)\n at Mono.Net.Security.AsyncReadRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x0000c] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n at Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () [0x000ff] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at Mono.Net.Security.AsyncProtocolRequest+<StartOperation>d__23.MoveNext () [0x0008b] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 ","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2146233088,"Source":"mscorlib"},"HelpURL":null,"StackTraceString":" at Mono.Net.Security.MobileAuthenticatedStream+<StartOperation>d__58.MoveNext () [0x001bf] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 \n at System.Net.WebResponseStream+d__50.MoveNext () [0x000e0] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n— End of stack trace from previous location where exception was thrown —\n at System.Net.HttpWebRequest+d__2441[T].MoveNext () [0x000ba] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f3f2aa82c3a04d48845485ce37124803>:0 \n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 \n at System.Net.WebResponseStream+d__48.MoveNext () [0x00253] in <81ba78c8dc794b7f9f7b530c53db0f84>:0 “,“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:null,“HResult”:-2146233087,“Source”:“mscorlib”},“HelpURL”:null,“StackTraceString”:” at Duplicati.Library.Main.BackendManager.List () [0x00049] in :0 \n at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, Duplicati.Library.Main.IBackendWriter log, System.String protectedfile) [0x0000d] in :0 \n at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, Duplicati.Library.Main.IBackendWriter log, System.String protectedfile) [0x00000] in :0 \n at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify (Duplicati.Library.Main.BackendManager backend, System.String protectedfile) [0x0010d] in :0 \n at Duplicati.Library.Main.Operation.BackupHandler+d__19.MoveNext () [0x01031] in :0 \n— End of stack trace from previous location where exception was thrown —\n at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] in <6973ce2780de4b28aaa2c5ffc59993b1>:0 \n at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String sources, Duplicati.Library.Utility.IFilter filter) [0x00008] in :0 \n at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.b__0 (Duplicati.Library.Main.BackupResults result) [0x00035] in :0 \n at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x00271] in :0 \n at Duplicati.Library.Main.Controller.Backup (System.String inputsources, Duplicati.Library.Utility.IFilter filter) [0x00068] in :0 \n at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean fromQueue) [0x00307] in :0 ",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:null,“HResult”:-2146233079,“Source”:“mscorlib”}

Summary-
I spent several hours on this, which ultimately didn’t find a fix.
However is desperation I created a new bucket in Backblaze B2 and it worked straight away.
Bummer man.

  • At one stage I had edited the SSL/ TLS page on Github with my ‘fix’ for Mac OS. As this was not proven to work I reverted those changes.