Failed to sync: context canceled

What is the problem you are having with rclone?

When I try to sync I get errors in the log Failed to sync: context canceled

2022/11/11 07:16:24 DEBUG : smb://backuper@sql05.prodnt:445/Backup/ToAutoRestor: Not closing 0 unused connections as 1 sessions active
2022/11/11 07:17:24 DEBUG : smb://backuper@sql05.prodnt:445/Backup/ToAutoRestor: Not closing 0 unused connections as 1 sessions active
2022/11/11 07:18:23 INFO  : AG01$SQLAG01_mst_DIFF_20221111_053452.bak: Copied (new)
2022/11/11 07:18:23 DEBUG : Waiting for deletions to finish
2022/11/11 07:18:23 INFO  :    88.209 GiB / 88.209 GiB, 100%, 150.723 MiB/s, ETA 0s
2022/11/11 07:18:23 DEBUG : 8 go routines active
2022/11/11 07:18:23 DEBUG : smb://backuper@sql05.prodnt:445/Backup/ToAutoRestor: Closing 2 unused connections
2022/11/11 07:18:23 Failed to sync: context canceled

Maybe the reason is that I'm running the rclone from a python script?
Like this:

command= clone sync /mnt/storage/ sql05_autorestor:Backup/ToAutoRestor --max-age 2022-11-06 --filter="+ AG01\$SQLAG01_mst_*" --filter="- *" --local-no-check-updated --delete-excluded --stats-one-line --stats 10m --log-level=DEBUG

cmd = subprocess.run(command
                         , capture_output=True, shell=True, text=True)

sql05_autorestor - is smb backend

Run the command 'rclone version' and share the full output of the command.

rclone v1.60.0

Which cloud storage system are you using? (eg Google Drive)

smb (cifs on windows)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

I run rclone from python script by subprocess.run module

command= clone sync /mnt/storage/ sql05_autorestor:Backup/ToAutoRestor --max-age 2022-11-06 --filter="+ AG01\$SQLAG01_mst_*" --filter="- *" --local-no-check-updated --delete-excluded --stats-one-line --stats 10m --log-level=DEBUG

cmd = subprocess.run(command
                         , capture_output=True, shell=True, text=True)

The rclone config contents with secrets removed.

[sql05_autorestor]
type = smb
host = sql05.domain
user = backuper
pass = ***
domain = domain

A log from the command with the -vv flag

https://pastebin.com/X4dvag08

Unfortunately your paste is missing. Can you put the log up again?

I'm not sure what the problem is here without seeing the log, but I'll just note the smb backend is very new so could have problems we haven't found yet.

I think that is unlikely to be the problem.

1 Like

hello and welcome to the forum,

make sure the rclone command works from the command line first, then try python
when testing subprocess.run, use a simple command such as rclone version

i use subprocess.run - let me know if this helps
https://forum.rclone.org/t/dropbox-upload-using-bash/34009/7

think that should be rclone sync

https://pastebin.com/X4dvag08
when i try to view the log, i get "This page is no longer available."

Sorry for long expectation.
I re-upload full log: 2022-11-15 07:05:47.876 | DEBUG | __main__:sync_sql04_mst_to_sql05:60 - Scrip - Pastebin.com

think that should be rclone sync

Yes, it's copy-pase error. In my script rclone

Thanks for the log.

I think this is a bug in the smb backend connection pooling.

Can you try this?

v1.61.0-beta.6566.dd1dad4c0.fix-smb-context-pool on branch fix-smb-context-pool (uploaded in 15-30 mins)

@Lesmiscore - what do you think - does that fix look correct?

1 Like

@ncw can you compile test version for ubuntu 20.04 (x64) please :pray:

Oh. I see) already compile))

I need 24h for test. I'll be back as soon as I get results. Thx

1 Like

@ncw That looks good
Let's wait for @anshibanov 's reply

1 Like

@ncw @Lesmiscore thx guys! Bug fixed ) No errors

Thanks for testing @anshibanov and thanks for your comment @Lesmiscore

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.60.1 and v1.61

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.