What is the problem you are having with rclone?
For rclone mount
:
- Add a file to VFS
- rclone finished upload it
- rclone get the changeNotify
and if there is any temporary network error like timeout, VFS will hang up until network back to work
Run the command 'rclone version' and share the full output of the command.
rclone v1.65.0
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-169-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Onedrive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone mount odrive:linode /onedrive --allow-other --transfers 4 --buffer-size 64M --cache-dir /root/onedrive_cache --vfs-cache-mode full --vfs-read-chunk-size 2M --vfs-read-chunk-size-limit 0M --vfs-cache-max-size 5G --vfs-cache-max-age 3360h --allow-non-empty --dir-cache-time 3360h --umask 000 --vfs-cache-poll-interval 3h --vfs-write-back 3s --poll-interval 5s --log-file /root/rclone.txt --log-level DEBUG
The rclone config contents with secrets removed.
[odrive]
type = onedrive
client_id = ffeeed50-ea2e-4a3c-8713-6ec66fe0c696
client_secret = ...
token = {"access_token":"...","token_type":"Bearer","refresh_token":"..."}
drive_id = b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl
drive_type = business
A log from the command with the -vv
flag
2023/12/19 13:21:14 DEBUG : rclone: Version "v1.65.0" starting with parameters ["rclone" "mount" "odrive:linode" "/onedrive" "--allow-other" "--transfers" "4" "--buffer-size" "64M" "--cache-dir" "/root/onedrive_cache" "--vfs-cache-mode" "full" "--vfs-read-chunk-size" "2M" "--vfs-read-chunk-size-limit" "0M" "--vfs-cache-max-size" "5G" "--vfs-cache-max-age" "3360h" "--allow-non-empty" "--dir-cache-time" "3360h" "--umask" "000" "--vfs-cache-poll-interval" "3h" "--vfs-write-back" "3s" "--poll-interval" "5s" "--log-file" "/root/rclone.txt" "--log-level" "DEBUG"]
2023/12/19 13:21:14 DEBUG : Creating backend with remote "odrive:linode"
2023/12/19 13:21:14 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/12/19 13:21:14 DEBUG : odrive: Loaded invalid token from config file - ignoring
2023/12/19 13:21:14 DEBUG : odrive: Token refresh failed try 1/5: Post "https://login.microsoftonline.com/common/oauth2/v2.0/token": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:15 DEBUG : odrive: Loaded invalid token from config file - ignoring
2023/12/19 13:21:15 DEBUG : Saving config "token" in section "odrive" of the config file
2023/12/19 13:21:15 DEBUG : odrive: Saved new token in config file
2023/12/19 13:21:15 DEBUG : OneDrive root 'linode': Next delta token is: NDslMjM0OyUyMzE7MzswYzhhOWNhZS0xMzY5LTQ0Y2EtOWZkZS05MTI5ZDk3MmQ2MjU7NjM4Mzg1ODg4NzUwMDMwMDAwOzE5ODE3NDUxMjslMjM7JTIzOyUyMzA7JTIz
2023/12/19 13:21:15 DEBUG : vfs cache: root is "/root/onedrive_cache"
2023/12/19 13:21:15 DEBUG : vfs cache: data root is "/root/onedrive_cache/vfs/odrive/linode"
2023/12/19 13:21:15 DEBUG : vfs cache: metadata root is "/root/onedrive_cache/vfsMeta/odrive/linode"
2023/12/19 13:21:15 DEBUG : Creating backend with remote "/root/onedrive_cache/vfs/odrive/linode"
2023/12/19 13:21:15 DEBUG : Creating backend with remote "/root/onedrive_cache/vfsMeta/odrive/linode"
2023/12/19 13:21:15 DEBUG : OneDrive root 'linode': Mounting on "/onedrive"
2023/12/19 13:21:15 DEBUG : vfs cache RemoveNotInUse (maxAge=12096000000000000, emptyOnly=false): item ca/cf/test.txt not removed, freed 0 bytes
2023/12/19 13:21:15 DEBUG : vfs cache RemoveNotInUse (maxAge=12096000000000000, emptyOnly=false): item cb/cf/test.txt not removed, freed 0 bytes
2023/12/19 13:21:15 DEBUG : vfs cache RemoveNotInUse (maxAge=12096000000000000, emptyOnly=false): item test/test.txt not removed, freed 0 bytes
2023/12/19 13:21:15 DEBUG : vfs cache RemoveNotInUse (maxAge=12096000000000000, emptyOnly=false): item test.txt not removed, freed 0 bytes
2023/12/19 13:21:15 INFO : vfs cache: cleaned: objects 4 (was 4) in use 0, to upload 0, uploading 0, total size 31 (was 31)
2023/12/19 13:21:15 DEBUG : : Root:
2023/12/19 13:21:15 DEBUG : : >Root: node=/, err=<nil>
2023/12/19 13:21:16 DEBUG : /: Lookup: name="test.txt"
2023/12/19 13:21:16 DEBUG : /: >Lookup: node=test.txt, err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: Attr:
2023/12/19 13:21:16 DEBUG : test.txt: >Attr: a=valid=1s ino=0 size=15 mode=-rw-rw-rw-, err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: Open: flags=OpenWriteOnly
2023/12/19 13:21:16 DEBUG : test.txt: Open: flags=O_WRONLY
2023/12/19 13:21:16 DEBUG : test.txt: newRWFileHandle:
2023/12/19 13:21:16 DEBUG : test.txt: >newRWFileHandle: err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: >Open: fd=test.txt (rw), err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: >Open: fh=&{test.txt (rw)}, err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: Setattr: a=Setattr [ID=0xa Node=0x2 Uid=0 Gid=0 Pid=601379] size=0 handle=INVALID-0x0 lockowner
2023/12/19 13:21:16 DEBUG : test.txt: Truncating 1 file handles
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): openPending:
2023/12/19 13:21:16 DEBUG : test.txt: vfs cache: checking remote fingerprint "15,2023-12-19 13:11:11 +0000 UTC,5440431ae6008234cc0104610f0115ca30073a28" against cached fingerprint "15,2023-12-19 13:11:11 +0000 UTC,5440431ae6008234cc0104610f0115ca30073a28"
2023/12/19 13:21:16 DEBUG : test.txt: vfs cache: truncate to size=15 (not needed as size correct)
2023/12/19 13:21:16 DEBUG : : Added virtual directory entry vAddFile: "test.txt"
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): >openPending: err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: vfs cache: truncate to size=0
2023/12/19 13:21:16 DEBUG : test.txt: >Setattr: err=<nil>
2023/12/19 13:21:16 DEBUG : test.txt: Attr:
2023/12/19 13:21:16 DEBUG : test.txt: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: Flush:
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): RWFileHandle.Flush
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: >Flush: err=<nil>
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: Write: len=15, offset=0
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): _writeAt: size=15, off=0
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): >_writeAt: n=15, err=<nil>
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: >Write: written=15, err=<nil>
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: Flush:
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): RWFileHandle.Flush
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: >Flush: err=<nil>
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: Release:
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): RWFileHandle.Release
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): close:
2023/12/19 13:21:16 DEBUG : vfs cache: looking for range={Pos:0 Size:15} in [{Pos:0 Size:15}] - present true
2023/12/19 13:21:16 DEBUG : test.txt: vfs cache: setting modification time to 2023-12-19 13:21:16.324752483 +0000 UTC m=+2.056246773
2023/12/19 13:21:16 INFO : test.txt: vfs cache: queuing for upload in 3s
2023/12/19 13:21:16 DEBUG : test.txt(0xc000ce59c0): >close: err=<nil>
2023/12/19 13:21:16 DEBUG : &{test.txt (rw)}: >Release: err=<nil>
2023/12/19 13:21:19 DEBUG : test.txt: vfs cache: starting upload
2023/12/19 13:21:19 DEBUG : test.txt: Starting multipart upload
2023/12/19 13:21:19 DEBUG : test.txt: Uploading segment 0/15 size 15
2023/12/19 13:21:20 DEBUG : test.txt: quickxor = 5440431ae6008234cc0104610f0115ca30073a28 OK
2023/12/19 13:21:20 INFO : test.txt: Copied (replaced existing)
2023/12/19 13:21:20 DEBUG : test.txt: vfs cache: fingerprint now "15,2023-12-19 13:21:16 +0000 UTC,5440431ae6008234cc0104610f0115ca30073a28"
2023/12/19 13:21:20 DEBUG : test.txt: vfs cache: writeback object to VFS layer
2023/12/19 13:21:20 DEBUG : : Added virtual directory entry vAddFile: "test.txt"
2023/12/19 13:21:20 INFO : test.txt: vfs cache: upload succeeded try #1
2023/12/19 13:21:20 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:20 DEBUG : : changeNotify: relativePath="test.txt", type=1
2023/12/19 13:21:20 DEBUG : : invalidating directory cache
2023/12/19 13:21:20 DEBUG : : >changeNotify:
2023/12/19 13:21:25 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:30 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:30 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=NDslMjM0OyUyMzE7MzswYzhhOWNhZS0xMzY5LTQ0Y2EtOWZkZS05MTI5ZDk3MmQ2MjU7NjM4Mzg1ODg4ODM1MTMwMDAwOzE5ODE3NDUyNTslMjM7JTIzOyUyMzA7JTIz": unexpected EOF
2023/12/19 13:21:35 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:35 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": unexpected EOF
2023/12/19 13:21:40 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:40 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:45 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:45 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:48 DEBUG : /: Attr:
2023/12/19 13:21:48 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxrwx, err=<nil>
2023/12/19 13:21:48 DEBUG : /: ReadDirAll:
2023/12/19 13:21:48 DEBUG : pacer: low level retry 1/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 20ms
2023/12/19 13:21:48 DEBUG : pacer: low level retry 2/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 40ms
2023/12/19 13:21:48 DEBUG : pacer: low level retry 3/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 80ms
2023/12/19 13:21:48 DEBUG : pacer: low level retry 4/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 160ms
2023/12/19 13:21:48 DEBUG : pacer: low level retry 5/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 320ms
2023/12/19 13:21:48 DEBUG : pacer: low level retry 6/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 640ms
2023/12/19 13:21:48 DEBUG : pacer: low level retry 7/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:48 DEBUG : pacer: Rate limited, increasing sleep to 1.28s
2023/12/19 13:21:49 DEBUG : pacer: low level retry 8/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:49 DEBUG : pacer: Rate limited, increasing sleep to 2s
2023/12/19 13:21:50 DEBUG : pacer: low level retry 9/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:50 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:50 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:52 DEBUG : pacer: low level retry 10/10 (error Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused)
2023/12/19 13:21:52 DEBUG : : Dir.ReadDirAll error: couldn't list files: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:52 ERROR : IO error: couldn't list files: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:52 DEBUG : /: >ReadDirAll: item=-1, err=couldn't list files: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/items/01QPGQHXLKBYIEMXSYCRG3KVHDFJVXVTLY/children?$top=1000": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:21:55 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:21:55 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:22:00 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:22:00 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:22:05 DEBUG : OneDrive root 'linode': Checking for changes on remote
2023/12/19 13:22:05 INFO : OneDrive root 'linode': Change notify listener failure: Get "https://graph.microsoft.com/v1.0/drives/b!QT-vBfWDykuEFt9u5LUVNJ3gNgu-9H5JtcpAQf5duVOunIoMaRPKRJ_ekSnZctYl/root/delta?token=": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
2023/12/19 13:22:09 INFO : Signal received: interrupt
2023/12/19 13:22:09 DEBUG : vfs cache: cleaner exiting
2023/12/19 13:22:09 ERROR : /onedrive: Unmounted rclone mount
2023/12/19 13:22:09 INFO : Exiting...
Here is my test script:
run.sh
:
#!/bin/sh
# run.sh
screen -d -m -S pproxy ./startpproxy.sh
screen -d -m -S rclone ./startRclone.sh
startRclone.sh
:
#!/bin/sh
# startRclone.sh
export http_proxy=http://localhost:8080
export https_proxy=http://localhost:8080
rclone mount odrive:linode /onedrive --allow-other --transfers 4 --buffer-size 64M --cache-dir /root/onedrive_cache --vfs-cache-mode full --vfs-read-chunk-size 2M --vfs-read-chunk-size-limit 0M --vfs-cache-max-size 5G --vfs-cache-max-age 3360h --allow-non-empty --dir-cache-time 3360h --umask 000 --vfs-cache-poll-interval 3h --vfs-write-back 3s --poll-interval 5s --log-file /root/rclone.txt --log-level DEBUG
startpproxy.sh
:
#!/bin/sh
# startpproxy.sh
pproxy &
PID_1=$!
sleep 2
echo "This is a Test" > /onedrive/test.txt
sleep 10
kill $PID_1
pproxy -b rules &
PID=$!
sleep 10
kill $PID
rules
:
(?:.+\.)?graph\.microsoft.*\.com
I use python-proxy
to simulate the network timeout, when you see rclone finished file upload and get the changeNotify, type ls /onedrive
:
ls: reading directory '/onedrive': Input/output error
if the request timeout for like 2 mins, the VFS will hang up for even more long time.