WebDAV, pCloud, Duplicati

Since few days I have a problem to backup to pCloud.

  • I can ping webdav.pcloud.com from the local server.
  • I can open the webdav page in browser from a Linux client.
  • When I test the connection from the local server with an existing profile in Duplicati with wrong password I get “Failed to connect: The remote server returned an error: (401) Unauthorized.”
  • When I test the connection with a new profile the test is successful
    –> connection to WebDAV server is working and information are being exchanged between local server and pCloud server
    But: when I use correct password with an existing profile I get “Failed to connect: Expecting chunk trailer.”

Duplicati Version: 2.0.4.23_beta_2019-07-14

Below the part in syslog of the test with correct password:

Dec 24 08:36:36 odroid duplicati-server[1543]: System.Net.WebException: Error getting response stream (ReadDoneAsync2): ReceiveFailure
Dec 24 08:36:36 odroid duplicati-server[1543]:   at System.Net.WebResponseStream.InitReadAsync (System.Threading.CancellationToken cancellationToken) [0x000f3] in <dfe42095fd31410e95d8021f755c3557>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at System.Net.WebOperation.Run () [0x001d9] in <dfe42095fd31410e95d8021f755c3557>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <dfe42095fd31410e95d8021f755c3557>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   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 <dfe42095fd31410e95d8021f755c3557>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <2b2660cd66234060ac508681b40577e7>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <2b2660cd66234060ac508681b40577e7>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Library.Backend.WEBDAV.ListWithouExceptionCatch () [0x0007c] in <d6379bd8e6564261a833b24b303b9869>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Library.Backend.WEBDAV.List () [0x000a5] in <d6379bd8e6564261a833b24b303b9869>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Library.Backend.WEBDAV.Test () [0x00000] in <d6379bd8e6564261a833b24b303b9869>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.TestConnection (System.String url, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x000b7] in <be73c239d77d4180b5147067144fc237>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x00091] in <be73c239d77d4180b5147067144fc237>:0
Dec 24 08:36:36 odroid duplicati-server[1543]:   at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) [0x00280] in <be73c239d77d4180b5147067144fc237>:0

Hello,

Since last saturday (21/12), I encounter exactly the same issue, but only on 2 of my 6 backups that I have on pCloud… The 4 other ones are running OK…

Log data:
2019-12-24 03:25:36 +00 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error
System.Net.WebException: Expecting chunk trailer.
at System.Net.MonoChunkStream.ThrowExpectingChunkTrailer () [0x0000e] in <9b672a45b19f4d52b5f28f32c0c91d97>:0
at System.Net.MonoChunkStream.FinishReading (System.Threading.CancellationToken cancellationToken) [0x00140] in <9b672a45b19f4d52b5f28f32c0c91d97>:0
at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <9b672a45b19f4d52b5f28f32c0c91d97>:0
at Duplicati.Library.Main.BackendManager.List () [0x00049] in :0
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
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
at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify (Duplicati.Library.Main.BackendManager backend, System.String protectedfile) [0x0010b] in :0
at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x004ce] in :0

Both failing backup have more than 3000 files in respective folders in pCloud.

I’m using Duplicati 2.0.4.37_canary_2019-12-12 in docker in Synology DSM 5.
What can I do to help ?

Regards

I just ran a “verify file” on one backup, avec everything is OK in the result log

For info, after running the “verify file”, I ran the backup, and it went OK…

Webdav error: unexpected EOF reading trailer posted on the Duplicacy (different backup program) forum reported on Dec 23 that pCloud began failing in a similar way. Word differences in the exact message are likely from the different libraries used. Duplicati uses Mono’s for its C# code, whereas Duplicacy uses a library written in Go. There are also some hints there on how to work with pCloud support if you wish to try your luck with that… Perhaps a mono update would help, but I doubt that. Results on Windows might also be interesting. It looks, though, like pCloud has closed on us early:

Thanks for that test. I wonder if pCloud has somehow lost the ability to do listings of large directories? This isn’t unheard of, and somewhat painful workarounds exist. Use fewer files, but make each larger.

What difference is there in the two profiles besides new versus old? Is new empty, and old quite full? Testing could be done of trying to make the new one look more and more like the old - until it breaks.

I wonder if the big directory listing could be made to fail in some WebDAV client that’s not a backup? Some very popular WebDAV client (if it exists) might get a better reaction if you ask pCloud support.

The “chunk” references probably refer to breaking the total response into chunks as described here, probably described in more user-friendly terms elsewhere if you want to go look. I’m not an expert…

Source guess:

https://golang.org/src/net/http/transfer.go
(search unexpected EOF reading trailer)

I ran the second backup that was failing, and it successfully ran OK…
I’ll see tomorrow, if the scheduled tasks will be OK.

Thanks for your answer ts678.
I will try to investigate on pCloud side.

Very sad that pCloud support team always says that “they don’t support this product” as answer…

Regards

Hello,

For information, this morning, all backup ran OK.
New files were added in both previously failing jobs.

Merry Christmas !
Regards

Recreating the database solved the issue on some of the profiles. I am moving from small to large. Let’s see if it is working for all the profiles.

I had a hard time trouble shooting as I reinstalled the server and moved Duplicati to Docker when I noticed the issue. So lots of potential causes :wink:

Thanks for the info here and Merry Christmas!!!

Done. Recreating the databases did the trick.

:grinning: :grinning: :grinning: :grinning: :grinning:

Hello,

Good news T-6 !
For me too, all backups are ok now :slight_smile: