Backup 95% complete then No connection could be made because the target machine actively refused it

Trying to get a clean backup on a very large (2TB) directory with 500k + files. If that’s the problem I can fix that. But if not, how do I start to troubleshoot it? I can restart the download immediately and it will get to the same place (95% complete) and then the same error.

I just downloaded the latest canary 2.1.0.108 and will try that, otherwise, I’ve got nothing to go on.

I assume you mean backup? Status bar has progress and state. What are you seeing there?

Is there a job log? If so, what more can you find on the error?
Complete log there has another view, including some stats.

If About → Show log → Stored caught error, click it for detail.

This sounds like it might be doing something with Destination.
Please describe the Destination – at least what Storage Type?

Webdav back-end running on Ubuntu that is on the same local net as the requesting PC. I use the public IP addr for consistency.
I have several other machine in this same building that are actively backing up without errors, but this one is the largest by far. That’s why I thought size might be playing a factor.

The error changed from this “actively refused connection” to the 500 error after I upgraded to the latest Canary. Hence the 2nd posting about that as I assumed the error was related to the newer version

Show log for the 95%:

Feb 9, 2025 3:03 AM: Failed while executing Backup “zz.rick-s.backups5” (id: 32)
System.AggregateException: One or more errors occurred. —> System.AggregateException: No connection could be made because the target machine actively refused it 47.155.192.51:443 —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 47.155.192.51:443
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CoCoL.AutomationExtensions.d__101.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- End of inner exception stack trace --- at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- End of inner exception stack trace --- at CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task) at Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.<Backup>b__0(BackupResults result) at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action1 method)
at Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter)
at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)
—> (Inner Exception #0) System.AggregateException: No connection could be made because the target machine actively refused it 47.155.192.51:443 —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 47.155.192.51:443
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CoCoL.AutomationExtensions.d__101.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- End of inner exception stack trace --- at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() ---> (Inner Exception #0) System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 47.155.192.51:443 at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Duplicati.Library.Main.Operation.BackupHandler.d__19.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()<—

—> (Inner Exception #1) System.AggregateException: One or more errors occurred. —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 47.155.192.51:443
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Duplicati.Library.Main.Operation.Backup.BackendUploader.<b__13_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CoCoL.AutomationExtensions.d__101.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 47.155.192.51:443 at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Duplicati.Library.Main.Operation.BackupHandler.d__19.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()<—
<—
<—

What does 95% refer to? If you mean the progress bar at top of GUI, what does the text say?

Posted log has nice low-level details, while giving no clue as to the larger flow of backup then.

Was the log from About → Show log → Stored? Was there also a job log made for failed run?

Assuming this is the WebDAV server’s IP, what logs does it have that might explain its failure?

TCP SYN Queue and Accept Queue Overflow Explained discusses. Look for why RST is sent.

Your “500 (internal server error)” might be similar (can’t say without logs), but got a little further.

Since this could be some sort of an overload, it’s certainly possible to make Duplicati go slower.

First make sure Options screen Remote volume size is reasonable, not huge. Default is 50MB.

asynchronous-concurrent-upload-limit can be lowered from default 4 to 1 for 1 file at a time.

You might be having upload retries. You can look at RetryAttempts in a job log Complete log .

If it’s retrying too little or too aggressively for the WebDAV server, there are options to adjust that:

  --number-of-retries (Integer): Number of times to retry a failed transmission
    If an upload or download fails, Duplicati will retry a number of times before failing. Use this to handle unstable network connections better.
    * default value: 5

  --retry-delay (Timespan): Time to wait between retries
    After a failed transmission, Duplicati will wait a short period before attempting again. This is useful if the network drops out occasionally during transmissions.
    * default value: 10s

  --retry-with-exponential-backoff (Boolean): Exponential backoff for backend errors
    After a failed transmission, Duplicati will wait a short period before attempting again. This period is controlled by the retry-delay option. Use this option to double that period after each consecutive
    failure.
    * default value: false

You should be able to see retries on either of the server error types with a log at Retry level, e.g. log-file=<path> log-file-log-level=Retry. About → Show log → Live → Retry may suffice, however output size is limited. It might be enough for starters to get a broad view of error context.

So the problem was my backend device which was usb connected and which had auto-suspended.

So that’s a big mea culpa and I apologize for the long winded (and doubled topics) previously submitted.

Can we remove both of the previous posted topics and subsequent replies?

This has left me with one question though: even after the USB backend was restored and functioning properly, I had to recreate a new duplicati backup, as the old one still presented the 500 error. After creating a new backup job, I used links to point to the old backend location and copied the db and all has worked (so far!) So is there some internal pointer to the backend that can’t be repointed to a new backend location?

Thanks

Did that log the error similarly to the detailed log you posted? If so, it’s from destination.
If it’s from the server, I’m not sure how re-using the destination in a new job would help.
But if it does, great. I’m not sure what was done:

I don’t follow that. What sort of links, put where? Backend location URLs are in a database.

using nextcloud, every user created gets an empty dir in /media/nc-data
that’s on root, so i create a soft link to point to my larger disks (in this case nc-data4) which looks like this

lrwxrwxrwx 1 root root 34 Feb 11 12:08 zz.rick-s.backups6 → /media/nc-data4/zz.rick-s.backups5

since this works, (at least so far), I assume that the error is coming from the destination and once I fixed the USB auto-suspend, so far so good.

Hope that clears things up somewhat.
Thanks
Rick

1 Like