FTPS error 150 Opening BINARY mode

I have configured duplicati with FTPS connection. I have added self-signed cert to trusted. FTP server is working on QNAP.

After one of updates of QNAP it started throwing error in duplicati:

Failed: One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection

Duplicati is running in Docker on linux machine.
Duplicati version: 2.0.6.3_beta_2021-06-17
QNAP version: 5.0.0.1808
I tried also with passive mode, same result. I tried also checking files and DB repair.

Full log:

Failed: One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.) (One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.)))
Details: System.AggregateException: One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.) (One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.))) ---> System.AggregateException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.) (One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.)) ---> System.Net.WebException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00115] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Threading.Tasks.TaskToApm.End (System.IAsyncResult asyncResult) [0x0002a] in <d13c8b563008422a8c5aaec0a74089cc>:0 
 at System.Net.Security.SslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Net.TlsStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at (wrapper remoting-invoke-with-check) System.Net.TlsStream.EndAuthenticateAsClient(System.IAsyncResult)
 at System.Net.FtpControlStream.SSLHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Utility.AsyncHttpRequest.GetRequestStream (System.Int64 contentlength) [0x00068] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Backend.FTP.PutAsync (System.String remotename, System.IO.Stream input, System.Threading.CancellationToken cancelToken) [0x0029d] in <5d38af7d86584ba0b36bdbc1a6e4b2c4>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoPut (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Interface.IBackend backend, System.Threading.CancellationToken cancelToken) [0x00426] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader+<>c__DisplayClass20_0.<UploadFileAsync>b__0 () [0x0010a] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x0017c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x003a5] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadFileAsync (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x000da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadBlockAndIndexAsync (Duplicati.Library.Main.Operation.Backup.VolumeUploadRequest upload, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x00098] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d4] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x001da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x01048] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
  --- End of inner exception stack trace ---
 at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x0005d] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00009] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Controller+<>c__DisplayClass14_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x0004b] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x0011c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
---> (Inner Exception #0) System.AggregateException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.) (One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.)) ---> System.Net.WebException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00115] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Threading.Tasks.TaskToApm.End (System.IAsyncResult asyncResult) [0x0002a] in <d13c8b563008422a8c5aaec0a74089cc>:0 
 at System.Net.Security.SslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Net.TlsStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at (wrapper remoting-invoke-with-check) System.Net.TlsStream.EndAuthenticateAsClient(System.IAsyncResult)
 at System.Net.FtpControlStream.SSLHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Utility.AsyncHttpRequest.GetRequestStream (System.Int64 contentlength) [0x00068] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Backend.FTP.PutAsync (System.String remotename, System.IO.Stream input, System.Threading.CancellationToken cancelToken) [0x0029d] in <5d38af7d86584ba0b36bdbc1a6e4b2c4>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoPut (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Interface.IBackend backend, System.Threading.CancellationToken cancelToken) [0x00426] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader+<>c__DisplayClass20_0.<UploadFileAsync>b__0 () [0x0010a] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x0017c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x003a5] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadFileAsync (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x000da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadBlockAndIndexAsync (Duplicati.Library.Main.Operation.Backup.VolumeUploadRequest upload, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x00098] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d4] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x001da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x01048] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00115] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Threading.Tasks.TaskToApm.End (System.IAsyncResult asyncResult) [0x0002a] in <d13c8b563008422a8c5aaec0a74089cc>:0 
 at System.Net.Security.SslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Net.TlsStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at (wrapper remoting-invoke-with-check) System.Net.TlsStream.EndAuthenticateAsClient(System.IAsyncResult)
 at System.Net.FtpControlStream.SSLHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Utility.AsyncHttpRequest.GetRequestStream (System.Int64 contentlength) [0x00068] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Backend.FTP.PutAsync (System.String remotename, System.IO.Stream input, System.Threading.CancellationToken cancelToken) [0x0029d] in <5d38af7d86584ba0b36bdbc1a6e4b2c4>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoPut (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Interface.IBackend backend, System.Threading.CancellationToken cancelToken) [0x00426] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader+<>c__DisplayClass20_0.<UploadFileAsync>b__0 () [0x0010a] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x0017c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x003a5] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadFileAsync (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x000da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadBlockAndIndexAsync (Duplicati.Library.Main.Operation.Backup.VolumeUploadRequest upload, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x00098] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d4] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x001da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <e60bc008dd1b454d861cfacbdd3760b9>:0 <---

---> (Inner Exception #1) System.AggregateException: One or more errors occurred. (The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
.) ---> System.Net.WebException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00115] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Threading.Tasks.TaskToApm.End (System.IAsyncResult asyncResult) [0x0002a] in <d13c8b563008422a8c5aaec0a74089cc>:0 
 at System.Net.Security.SslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Net.TlsStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at (wrapper remoting-invoke-with-check) System.Net.TlsStream.EndAuthenticateAsClient(System.IAsyncResult)
 at System.Net.FtpControlStream.SSLHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Utility.AsyncHttpRequest.GetRequestStream (System.Int64 contentlength) [0x00068] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Backend.FTP.PutAsync (System.String remotename, System.IO.Stream input, System.Threading.CancellationToken cancelToken) [0x0029d] in <5d38af7d86584ba0b36bdbc1a6e4b2c4>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoPut (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Interface.IBackend backend, System.Threading.CancellationToken cancelToken) [0x00426] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader+<>c__DisplayClass20_0.<UploadFileAsync>b__0 () [0x0010a] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x0017c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x003a5] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadFileAsync (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x000da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadBlockAndIndexAsync (Duplicati.Library.Main.Operation.Backup.VolumeUploadRequest upload, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x00098] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d4] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x001da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
  --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00115] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Threading.Tasks.TaskToApm.End (System.IAsyncResult asyncResult) [0x0002a] in <d13c8b563008422a8c5aaec0a74089cc>:0 
 at System.Net.Security.SslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Net.TlsStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at (wrapper remoting-invoke-with-check) System.Net.TlsStream.EndAuthenticateAsClient(System.IAsyncResult)
 at System.Net.FtpControlStream.SSLHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Utility.AsyncHttpRequest.GetRequestStream (System.Int64 contentlength) [0x00068] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Backend.FTP.PutAsync (System.String remotename, System.IO.Stream input, System.Threading.CancellationToken cancelToken) [0x0029d] in <5d38af7d86584ba0b36bdbc1a6e4b2c4>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoPut (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Interface.IBackend backend, System.Threading.CancellationToken cancelToken) [0x00426] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader+<>c__DisplayClass20_0.<UploadFileAsync>b__0 () [0x0010a] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x0017c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x003a5] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadFileAsync (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x000da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadBlockAndIndexAsync (Duplicati.Library.Main.Operation.Backup.VolumeUploadRequest upload, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x00098] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d4] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x001da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <e60bc008dd1b454d861cfacbdd3760b9>:0 <---
<---
<---


Log data:
2021-10-20 06:24:43 +00 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error
System.Net.WebException: The remote server returned an error: 150 Opening BINARY mode data connection for Backup/samba/duplicati-bef84e78c3c8a4480a6ae8194b3f1a7ab.dblock.zip.aes
. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00115] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Threading.Tasks.TaskToApm.End (System.IAsyncResult asyncResult) [0x0002a] in <d13c8b563008422a8c5aaec0a74089cc>:0 
 at System.Net.Security.SslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at System.Net.TlsStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00000] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
 at (wrapper remoting-invoke-with-check) System.Net.TlsStream.EndAuthenticateAsClient(System.IAsyncResult)
 at System.Net.FtpControlStream.SSLHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <6bc04dcac0a443ee834a449c98b8ed9d>:0 
  --- End of inner exception stack trace ---
 at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Utility.AsyncHttpRequest.GetRequestStream (System.Int64 contentlength) [0x00068] in <2a3ee711c7c04f6c957360f2cf183a7f>:0 
 at Duplicati.Library.Backend.FTP.PutAsync (System.String remotename, System.IO.Stream input, System.Threading.CancellationToken cancelToken) [0x0029d] in <5d38af7d86584ba0b36bdbc1a6e4b2c4>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoPut (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Interface.IBackend backend, System.Threading.CancellationToken cancelToken) [0x00426] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader+<>c__DisplayClass20_0.<UploadFileAsync>b__0 () [0x0010a] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x0017c] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.DoWithRetry (System.Func`1[TResult] method, Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x003a5] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadFileAsync (Duplicati.Library.Main.Operation.Common.BackendHandler+FileEntryItem item, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x000da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.Backup.BackendUploader.UploadBlockAndIndexAsync (Duplicati.Library.Main.Operation.Backup.VolumeUploadRequest upload, Duplicati.Library.Main.Operation.Backup.BackendUploader+Worker worker, System.Threading.CancellationToken cancelToken) [0x00098] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d4] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x001da] in <e60bc008dd1b454d861cfacbdd3760b9>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <e60bc008dd1b454d861cfacbdd3760b9>:0

Can you elaborate on this? Did you configure the certificate hash to be trusted in your Duplicati backup config:

If both machines are on the same trusted network, could you do a quick test without SSL just to see if it works?

Yes, hash was added and it was working previously without a problem. I had to switch to SFTP protocol and it’s working fine, but QNAP require admin rights to use SSH so it’s not great solution. I’d like to go back to FTPS in this case. I checked the user which I use to authenticate and it has full rights to directory (download/upload tested). I can see also empty 0 bytes files on QNAP - duplicate fail while uploading.

Can you try “FTP (Alternative)” instead of “FTP” and see if it makes any difference? Sometimes switching from one to the other can resolve issues with certain FTP servers.

It’s a shame SFTP requires an admin level account on your QNAP. SFTP is usually a lot more reliable than FTP/FTPS.

Today I installed newest QNAP update. Updating 5.0.0.1808(20211001) to 5.0.0.1828(20211020) fixed issue.
So just QNAP screwed up something in FTP client. I’m (unfortunately) switching back from SFTP because of too wide permissions. I hate it too.

Thank you for your time :+1:

1 Like