Has anyone ever had this problem in the past ? Onedrive v2

Hello everyone,

I’ve got an issue when I’m running a backup of some folders on my Onedrive v2.
Indeed, there is the issue “an existing connection was forcibly closed by the remote host” during this backup. Obviously there are no issues when I’m doing a backup on an external drive.
It seems that the issue come from Onedrive, but I’m not sure.
For information, Its a Windows 11 device.
Has anyone ever had this problem in the past ?

Thanks for future answers !
Corentin

Here is the logs (sorry my app is in French):

System.AggregateException: Une ou plusieurs erreurs se sont produites. —> System.AggregateException: Une connexion existante a dû être fermée par l’hôte distant —> System.Net.Sockets.SocketException: Une connexion existante a dû être fermée par l’hôte distant
à System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
à System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à CoCoL.AutomationExtensions.d__101.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- Fin de la trace de la pile d'exception interne --- à Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- Fin de la trace de la pile d'exception interne --- à CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task) à Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.<Backup>b__0(BackupResults result) à Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action1 method)
à Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)
à Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)
—> (Exception interne #0) System.AggregateException: Une connexion existante a dû être fermée par l’hôte distant —> System.Net.Sockets.SocketException: Une connexion existante a dû être fermée par l’hôte distant
à System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
à System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à CoCoL.AutomationExtensions.d__101.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- Fin de la trace de la pile d'exception interne --- à Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() ---> (Exception interne #0) System.Net.Sockets.SocketException (0x80004005): Une connexion existante a dû être fermée par l’hôte distant à System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) à System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Duplicati.Library.Main.Operation.BackupHandler.d__19.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()<—

—> (Exception interne #1) System.AggregateException: Une ou plusieurs erreurs se sont produites. —> System.Net.Sockets.SocketException: Une connexion existante a dû être fermée par l’hôte distant
à System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
à System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à CoCoL.AutomationExtensions.d__101.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- Fin de la trace de la pile d'exception interne --- ---> (Exception interne #0) System.Net.Sockets.SocketException (0x80004005): Une connexion existante a dû être fermée par l’hôte distant à System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) à System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Duplicati.Library.Main.Operation.BackupHandler.d__19.MoveNext()
— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée —
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()<—
<—
<—

Hello

there is not much to go on in your log. The only thing that seem sure is that the communication with your provider hangs. It’s not even sure that the provider is responsible, it could even be a network problem (firewall, routing, mtu…), although the provider hypothesis is the most probable. Is the problem happening always at the same point in the backup (you can follow in the live log from the About… / Show log function, you can open Duplicati in 2 tabs of your browser) ?

Another way (a bit more involved, but can bring the most information) is to export the job as command line, copy it, open a terminal window, use a priviledged terminal window if you run Duplicati as system (as is the case when it’s run as a service), then paste the command as is and run it. Take care of changing the properties of the terminal window to set the number of lines to the max, so that important information will not risk to be scrolled out of view.

1 Like

Does terminal catch things that a log file at a fairly detailed level (e.g. verbose) misses?
I’ve always wondered if some errors just kind of write to standard output, so bypass log.

FWIW my OneDrive is happy now, but search of old logs found occasional similar glitch.
If one is prone to getting glitches, raising number-of-retries can help, and before failures,
Complete log has backend statistics that include “RetryAttempts” to see if you’re close.

log-file=<path> log-file-log-level=retry is a good way to get not-too-huge logs about retry.

I’d say when the C# runtime throws an exception that is not caught correctly by the software.

Thanks a lot for your answers, I tried today to clean the trash can like in this topic Google Docs abort: An existing connection was forcibly closed by the remote host · Issue #594 · duplicati/duplicati · GitHub and I tried another backup and now it works.
But I don’t know if it’s the real solution of the issue.
The trash can was full of .aes files.