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

**URL:** https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744
**Category:** Support
**Created:** [February 21, 2023, 11:19am UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744 "2023-02-21T11:19:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Corentin](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@Corentin](https://forum.duplicati.com/u/Corentin)
#### Post date: [February 21, 2023, 11:19am UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744/1 "2023-02-21T11:19:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Corentin](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@Corentin](https://forum.duplicati.com/u/Corentin)
#### Post date: [February 21, 2023, 2:01pm UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744/2 "2023-02-21T14:01:33Z")

</div>

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\_\_10`1.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, Action`1 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\_\_10`1.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__10`1.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\_\_10`1.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__10`1.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()\<—  
\<—  
\<—

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [February 21, 2023, 7:13pm UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744/3 "2023-02-21T19:13:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [February 22, 2023, 12:24am UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744/4 "2023-02-22T00:24:26Z")

</div>

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](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#number-of-retries) can help, and before failures,  
`Complete log` has backend statistics that include “RetryAttempts” to see if you’re close.

[log-file](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-file)=\<path\> [log-file-log-level](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-file-log-level)=retry is a good way to get not-too-huge logs about retry.

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [February 22, 2023, 7:22am UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744/5 "2023-02-22T07:22:14Z")

</div>

> [@ts678](#):
>
> some errors just kind of write to standard output

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

---

<div class="post-metadata">

### Author: ![Corentin](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@Corentin](https://forum.duplicati.com/u/Corentin)
#### Post date: [February 22, 2023, 3:33pm UTC](https://forum.duplicati.com/t/has-anyone-ever-had-this-problem-in-the-past-onedrive-v2/15744/6 "2023-02-22T15:33:40Z")

</div>

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](https://github.com/duplicati/duplicati/issues/594) 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.
