With the same configuration (dockerfile), the S3 bucket mounts OK in the docker host and container on my Windows 11 laptop, and in the docker host on EC2, but not in a container on EC2.
Same results with/without the --isolation=process paramter in the docker run command.
022/01/25 22:01:32 ERROR : S3 bucket rclonetest20220225: Mount failed
2022/01/25 22:01:32 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
Run the command 'rclone version' and share the full output of the command.
rclone v1.57.0
os/version: Microsoft Windows Server 2022 Datacenter 2009 (64 bit)
os/kernel: 10.0.20348.473 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.17.2
go/linking: dynamic
go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
S3
The command you were trying to run (eg rclone copy /tmp remote:tmp)
This fails:
"c:\ominer\bin\rclone\rclone.exe" mount s3clone:rclonetest20220225 c:\rclonetest20220225 --vfs-cache-mode full --config="c:\ominer\config\rclone.conf"
This works:
"c:\ominer\bin\rclone\rclone.exe" ls s3clone:rclonetest20220225 --config="c:\ominer\config\rclone.conf"
The rclone config contents with secrets removed.
[s3clone]
type = s3
provider = AWS
access_key_id = XXXXXXXXXXXXXXXXXXXX
secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
region = eu-west-2
location_constraint = eu-west-2
storage_class = STANDARD
A log from the command with the -vv flag
2022/01/25 22:10:03 DEBUG : rclone: Version "v1.57.0" starting with parameters ["c:\\ominer\\bin\\rclone\\rclone.exe" "mount" "-vv" "s3clone:rclonetest20220225" "c:\\rclonetest20220225" "--vfs-cache-mode" "full" "--config=c:\\ominer\\config\\rclone.conf"]
2022/01/25 22:10:03 DEBUG : Creating backend with remote "s3clone:rclonetest20220225"
2022/01/25 22:10:03 DEBUG : Using config file from "c:\\ominer\\config\\rclone.conf"
2022/01/25 22:10:03 INFO : S3 bucket rclonetest20220225: poll-interval is not supported by this remote
2022/01/25 22:10:03 DEBUG : vfs cache: root is "C:\\Users\\ContainerAdministrator\\AppData\\Local\\rclone"
2022/01/25 22:10:03 DEBUG : vfs cache: data root is "\\\\?\\C:\\Users\\ContainerAdministrator\\AppData\\Local\\rclone\\vfs\\s3clone\\rclonetest20220225"
2022/01/25 22:10:03 DEBUG : vfs cache: metadata root is "\\\\?\\C:\\Users\\ContainerAdministrator\\AppData\\Local\\rclone\\vfsMeta\\s3clone\\rclonetest20220225"
2022/01/25 22:10:03 DEBUG : Creating backend with remote "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfs/s3clone/rclonetest20220225"
2022/01/25 22:10:03 DEBUG : fs cache: renaming cache item "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfs/s3clone/rclonetest20220225" to be canonical "//?/C:/Users/ContainerAdministrator/AppData/Local/rclone/vfs/s3clone/rclonetest20220225"
2022/01/25 22:10:03 DEBUG : Creating backend with remote "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfsMeta/s3clone/rclonetest20220225"
2022/01/25 22:10:03 DEBUG : fs cache: renaming cache item "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfsMeta/s3clone/rclonetest20220225" to be canonical "//?/C:/Users/ContainerAdministrator/AppData/Local/rclone/vfsMeta/s3clone/rclonetest20220225"
2022/01/25 22:10:03 DEBUG : Network mode mounting is disabled
2022/01/25 22:10:03 DEBUG : Mounting on "c:\\rclonetest20220225" ("s3clone rclonetest20220225")
2022/01/25 22:10:03 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2022/01/25 22:10:03 DEBUG : S3 bucket rclonetest20220225: Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=s3clone rclonetest20220225"]
2022/01/25 22:10:03 ERROR : S3 bucket rclonetest20220225: Mount failed
2022/01/25 22:10:03 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
no idea why this fails in that one case, container on EC2.
do not think i have seen a docker on windows post here in the forum.
fwiw, i always test in a new situation, using the simplest command possible, no remotes, no vfs file cache, no config file. rclone.exe mount c:\source c:\mount
Thank you for your reply, and your suggestion. This also fails:
c:\ominer\bin\rclone>rclone.exe mount c:\ominer c:\ominermount
2022/01/25 23:12:08 NOTICE: Config file "C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2022/01/25 23:12:08 ERROR : Local file system at //?/c:/ominer: Mount failed
2022/01/25 23:12:08 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
Same problem with rclone-v1.56.2-windows-amd64.zip
I'd be surprised if I was the only person to try mounting S3 as a volume in a Windows docker container on AWS. Seems like a pretty obvious thing to want to do. But how?
well, i did not delete it but why open a second topic?
best to use this one.
imho, so far, there is no evidence this is a rclone bug.
rclone on docker is designed to run on standard linux only.
rclone on docker on windows is a very narrow use-case.
could be an issue with
--- docker on windows
--- ws2022
--- ec2
--- winfsp
Bingo, eureka, you were right, the issue was with winfsp not being installed in the host.
For rclone to work in a Windows docker container, WinFsp must be installed in the host AND the container.
And the container run with the --isolation=process parameter.
sure, winfsp needs to be installed where rclone is executed. i just assumed that from that start.
what threw me was the generic error you got, Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
that had me thinking that winfsp was installed in the container, and the issue was a config issue, permissions issue, or something like that.
as normally, if rclone cannot find winfsp, it outputs a very specific error. Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed: cgofuse: cannot find winfsp
winfsp was installed in the container, where rclone was executing, which is why rclone found winfsp.
But winfsp also needs to be installed in the host, for its File System Driver.
I can see this being a common mistake, because the mentality of the docker administrator is to install all the software in the container and minimise configuration in the host. But drivers are about hardware, so belong in the host.
Windows+docker+s3 might be an unusual use-case at the moment, but I think it'll grow rapidly when people catch on - you can migrate your legacy applications to fully managed cloud with effectively unlimited disk space that's automatically backed up, all without rewriting a line of code. That's gold.
Those tests were not on the same machine. I created/terminated multiple server instances while testing different Windows versions, application versions, 3rd party tools, configurations etc over several days, so once I confirmed winsft+rclone worked in the host, I didn't install it in subsequent instances, didn't realise I needed to, until now.