Error on CentOS with WebDav from Yandex (Could not find temp file - Error getting response stream (ReadDoneAsync2): ReceiveFailure

I installed on CentOS 7 Duplicati 2 (last canary - 2.0.4.34_canary_2019-11-05). After a few time I see that progress stopped and only after about 10-15 minutes I saw how new files appeared.
But after about 30-60 minutes I see error: “One or more errors occurred. (Could not find file “/tmp/dup-28004bc8-4ed6-4071-8aa0-44ee35e1c5ae” (Could not find file “/tmp/dup-28004bc8-4ed6-4071-8aa0-44ee35e1c5ae”) (One or more errors occurred. (Error getting response stream (ReadDoneAsync2): ReceiveFailure)))” and backup stopped.

There is some files after this backup. But in main window I see than I have never done backup.

I tried two times with same result. What is it and how I can fix it?

Following the only clue provided, the ReadDoneAsync2 looks like Duplicati asked mono to do a WebDAV operation, and Yandex sent nothing (zero bytes), or possibly closed the connection at:

To actually see if a connection closed at the network level is possible if you’re willing to capture packets with tcpdump, wireshark, tshark, or similar. Encryption gets in the way of doing a good higher-level look.

You can possibly get a Duplicati-level look by looking either at About --> Show log --> Live --> Retry or <backup name> --> Show log --> Remote and click on the downloads and uploads around time of error. Possibly you can find a multiple-line stack trace which would say more about where Duplicati was then.

So to confirm, you’re saying you see new files showing up at Yandex, viewed somehow separately from Duplicati, and at some point things stop working? What does the status bar say at the time of the error?

You can also watch live log as above. The backup should do lots of uploads, but at the end it will switch to Verifying backend files or Compacting files at the backend. When do you see that the error happens?

Have you used the “Test connection” button on the Destination screen a few times? Does it run reliably? This is generally just a directory listing, so it might work even if uploads or downloads are having issues. Does the <backup name> --> Verify files button work well? That’s similar to the verification after backup.

In looking over past Yandex reports, I see reports in 2017 and 2018 that it worked, but recently it hasn’t. How’s your experience been on other systems (if you run any)? You might also have a system problem.

You can run an Internet speed test to see if your network connectivity seems to be doing what it should. Testing Yandex specifically can be done with Duplicati.CommandLine.BackendTester.exe pointing to an empty folder. The URL to give that command can be based on the URL from Export As Command-line.

For whatever it’s worth, below are other recent poor Yandex experiences, so issue possibly is their end.

Error The base connection is closed (Webdav Yandex)

Duplicati cannot finish archiving

EDIT:

Found 3 remote files

Has stopped working Duplicati 10 errors constantly

At least some of the above look like Canary versions (and yours is). I wonder if older Beta would work, although it’s got a lot of other problems? If you can test 2.0.4.5 or 2.0.4.23 to Yandex it may be helpful.

For a real guess on Canary, you could also try reducing --asynchronous-concurrent-upload-limit to 1 in case somehow the default 4 concurrent uploads causes an issue. Beta doesn’t do concurrent uploads.

1 Like

Thank you for you answer. I see with Duplicati.CommandLine.BackendTester.exe next errors:

Starting run no 0
Generating file 0 (25.18 MB)
Generating file 1 (29.84 MB)
Generating file 2 (21.77 MB)
Generating file 3 (23.69 MB)
Generating file 4 (14.72 MB)
Generating file 5 (33.82 MB)
Generating file 6 (41.43 MB)
Generating file 7 (36.63 MB)
Generating file 8 (17.81 MB)
Generating file 9 (32.37 MB)
Uploading wrong files ...
Generating file 10 (1.46 KB)
Uploading file 0, 1.46 KB ...  done!
Uploading file 0, 1.46 KB ...  done!
Uploading file 9, 1.46 KB ...  done!
Uploading files ...
Uploading file 0, 25.18 MB ... Failed to upload file 0, error message: System.Net.WebException: Error getting response stream (ReadDoneAsync2): ReceiveFailure
  at System.Net.WebResponseStream.InitReadAsync (System.Threading.CancellationToken cancellationToken) [0x000f3] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.WebOperation.Run () [0x001d9] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <543f72c721f349bcae2247df14566c98>:0
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <621233224d6648a0a1cd0bb505473fc4>:0
  at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <621233224d6648a0a1cd0bb505473fc4>:0
  at Duplicati.Library.Backend.WEBDAV.Put (System.String remotename, System.IO.Stream stream) [0x000f7] in <c15fffc1b1ce4551832238a7b2d4aae6>:0
  at Duplicati.CommandLine.BackendTester.Program.Uploadfile (System.String localfilename, System.Int32 i, System.String remotefilename, Duplicati.Library.Interface.IBackend backend, System.Boolean disableStreaming) [0x00040] in <bd1b388df9584dac81154fd326836f15>:0 , remote name: czn5hhtQyGDHUziEiI
Uploading file 1, 29.84 MB ... Failed to upload file 1, error message: System.Net.WebException: Error getting response stream (ReadDoneAsync2): ReceiveFailure
  at System.Net.WebResponseStream.InitReadAsync (System.Threading.CancellationToken cancellationToken) [0x000f3] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.WebOperation.Run () [0x001d9] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <543f72c721f349bcae2247df14566c98>:0
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <621233224d6648a0a1cd0bb505473fc4>:0
  at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <621233224d6648a0a1cd0bb505473fc4>:0
  at Duplicati.Library.Backend.WEBDAV.Put (System.String remotename, System.IO.Stream stream) [0x000f7] in <c15fffc1b1ce4551832238a7b2d4aae6>:0
  at Duplicati.CommandLine.BackendTester.Program.Uploadfile (System.String localfilename, System.Int32 i, System.String remotefilename, Duplicati.Library.Interface.IBackend backend, System.Boolean disableStreaming) [0x00040] in <bd1b388df9584dac81154fd326836f15>:0 , remote name: jRO1FcydQYzz6236jcgZwofqtSCd8RIYAuTgPublIA3xt2TYTaLwzVA4MyGWJuf9p
Uploading file 2, 21.77 MB ... Failed to upload file 2, error message: System.Net.WebException: Error getting response stream (ReadDoneAsync2): ReceiveFailure
  at System.Net.WebResponseStream.InitReadAsync (System.Threading.CancellationToken cancellationToken) [0x000f3] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.WebOperation.Run () [0x001d9] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <543f72c721f349bcae2247df14566c98>:0
  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <543f72c721f349bcae2247df14566c98>:0
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <621233224d6648a0a1cd0bb505473fc4>:0
  at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <621233224d6648a0a1cd0bb505473fc4>:0
  at Duplicati.Library.Backend.WEBDAV.Put (System.String remotename, System.IO.Stream stream) [0x000f7] in <c15fffc1b1ce4551832238a7b2d4aae6>:0
  at Duplicati.CommandLine.BackendTester.Program.Uploadfile (System.String localfilename, System.Int32 i, System.String remotefilename, Duplicati.Library.Interface.IBackend backend, System.Boolean disableStreaming) [0x00040] in <bd1b388df9584dac81154fd326836f15>:0 , remote name: Dy9A2Glnue9bBWUHSd7KS9hzYcjnsezP7g6ueDdI5Yqinnn44PRmTFiDrJLYw85qNtevZ

… and so on and so far.

But all files are created.

I saw this problem in WinSCP, so decided to write and write about this error to YandexDisk support. So I’m waiting for an answer.

Thanks for the additional client testing (and there are lots of others to try). Does the issue seem file size dependent, meaning can you get even a small file to work? Duplicati.CommandLine.BackendTester.exe has --min-file-size and --max-file-size, or try chosen files with Duplicati.CommandLine.BackendTool.exe.

CentOS provides an older version of mono, and installing from https://www.mono-project.com/download/stable/#download-lin is advised regardless of where Yandex issue goes. What’s your mono --version?

1 Like

Thank you. Yandex support told me, that they supports only official client. And BTW all big files (> 1000 files of 100 Mb copied good). And I use other service to copy to yandex disk - all OK too.

I tested with different file sizes with Duplicati.CommandLine.BackendTester.exe … All OK than files <= 1Mb, but with 10 Mb I have one time out error. I see a pattern with time out and file size.

Unfortunately, @–asynchronous-concurrent-upload-limit=1" didn’t help.

“mono --version” - is actual, 6.4.0.198. I installed this version for D2 before.

Sorry, I didn’t understand that. Is that saying files <= 1MB were OK, time out, or something else?

You could try adjusting –http-readwrite-timeout and –http-operation-timeout for timeout problems.

1 Like

All OK with files <= 1Mb, but I saw timeout problems with files greater than 1 Mb.

Unfortunately, this flags didn’t help. I set it to 5 minutes both.

Some prior posts showed you had Windows. Do you still, and does it show the same problem? If so, Network Tracing in the .NET Framework might be a way to get more information, without encryption preventing a view of the activity as one might get with packet capture (without special workarounds). There are probably some forum or GitHub posts that provide specifics. But be careful what you post.

First question I wonder about is did Yandex respond but Duplicati didn’t notice, or did it not respond?

If you feel like seeing whether timing is involved, you can set –throttle-upload and –throttle-download (which the code confuses, so setting both helps) to a low value to see if you can make 1 MB files fail.

All of this might well lead into you filing an issue with as much as you can get, and hoping somebody familiar with WebDAV (and maybe willing to open a Yandex account) can make further progress on it.