What is the problem you are having with rclone?
I am trying to copy a file in rclone
to a different existing bucket but to a not existing path. Here rclone
is actually crashing with the following error:
NOTICE: Failed to copy: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: DC32VRCBK2Q7FRGC, HostID: QE+9xKEcU3bE765d8IgWN0lLFRA0u0mtfXdAKS7MbBb+eUXE/Wyn9oFAxArUNkawpoqLNPifAis=, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
When I use an existing file path, the command executes successfully. Similarly, re-running the same command with AWS CLI v2 also works without issues. Additionally, including the --s3-no-check-bucket
flag the file copy succeeds. However, if I omit this flag, the command fails. It’s worth noting that the credentials being used belong to a user with wildcard S3 permissions, including the s3:CreateBucket
permission. The region and the access/secret keys are set as env variables. The region is set to eu-central-1
using the following command: export RCLONE_CONFIG_AWS_REGION=eu-central-1
.
Run the command 'rclone version' and share the full output of the command.
rclone v1.68.2
- os/version: arch (64 bit)
- os/kernel: 6.12.1-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.3
- go/linking: dynamic
- go/tags: none
Yes, latest 1.68.2
Which cloud storage system are you using? (eg Google Drive)
AWS S3
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone copy aws:<source_bucket_name>/<file_path> aws:<dst_bucket_name>/<file_path>
The rclone config contents with secrets removed.
[aws]
type = s3
provider = AWS
env_auth = true
### Double check the config for sensitive info before posting publicly
A log from the command with the -vv
flag
2024/12/03 12:10:38 DEBUG : rclone: Version "v1.68.2" starting with parameters ["rclone" "copy" "-vv" "aws:team-****/demo/20s.mp3" "aws:****/tst2/"]
2024/12/03 12:10:38 DEBUG : Creating backend with remote "aws:team-****/demo/20s.mp3"
2024/12/03 12:10:38 DEBUG : Using config file from "/home/gstoyanov/.config/rclone/rclone.conf"
2024/12/03 12:10:38 DEBUG : Setting type="s3" for "aws" from environment variable RCLONE_CONFIG_AWS_TYPE
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : aws: detected overridden config - adding "{z-krK}" suffix to name
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : fs cache: adding new entry for parent of "aws:team-****/demo/20s.mp3", "aws{z-krK}:team-****/demo"
2024/12/03 12:10:38 DEBUG : Creating backend with remote "aws:****/tst2/"
2024/12/03 12:10:38 DEBUG : Setting type="s3" for "aws" from environment variable RCLONE_CONFIG_AWS_TYPE
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : aws: detected overridden config - adding "{z-krK}" suffix to name
2024/12/03 12:10:38 DEBUG : Setting region="eu-central-1" for "aws" from environment variable RCLONE_CONFIG_AWS_REGION
2024/12/03 12:10:38 DEBUG : fs cache: renaming cache item "aws:*****/tst2/" to be canonical "aws{z-krK}:****/tst2"
2024/12/03 12:10:38 DEBUG : 20s.mp3: Need to transfer - File not found at Destination
2024/12/03 12:10:38 ERROR : 20s.mp3: Failed to copy: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MKW0GQQBMJYBJJ, HostID: +4h/eigqyMYGDEW1AfCA0qMfCbbePmT1L6jXgP1usIblOswxWAq5NSMYNYclkj6msumOAVJ/Wj0/2OEG4hiCFg==, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
2024/12/03 12:10:38 ERROR : Attempt 1/3 failed with 1 errors and: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MKW0GQQBMJYBJJ, HostID: +4h/eigqyMYGDEW1AfCA0qMfCbbePmT1L6jXgP1usIblOswxWAq5NSMYNYclkj6msumOAVJ/Wj0/2OEG4hiCFg==, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
2024/12/03 12:10:39 DEBUG : 20s.mp3: Need to transfer - File not found at Destination
2024/12/03 12:10:39 ERROR : 20s.mp3: Failed to copy: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MW241TFXCRN5T7, HostID: 5zpGZe6gJsNq7ophaRvyK/H4qVdzXE6AH2Xzec3dgNu6uhrIDM9+ejqg0vIpTASckHx6JovvkoI=, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
2024/12/03 12:10:39 ERROR : Attempt 2/3 failed with 1 errors and: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MW241TFXCRN5T7, HostID: 5zpGZe6gJsNq7ophaRvyK/H4qVdzXE6AH2Xzec3dgNu6uhrIDM9+ejqg0vIpTASckHx6JovvkoI=, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
2024/12/03 12:10:39 DEBUG : 20s.mp3: Need to transfer - File not found at Destination
2024/12/03 12:10:39 ERROR : 20s.mp3: Failed to copy: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MW5BPM1HE3FXKR, HostID: gjfdWj1YRuY3r/gGrx3l2UtB/hheJi7HCbxbIpIsxeExyEr15rVbCGQPOye5Q6xjr04ljeAG68ge6PP429G28P9uVX5LrbjTPG8LizZP8uM=, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
2024/12/03 12:10:39 ERROR : Attempt 3/3 failed with 1 errors and: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MW5BPM1HE3FXKR, HostID: gjfdWj1YRuY3r/gGrx3l2UtB/hheJi7HCbxbIpIsxeExyEr15rVbCGQPOye5Q6xjr04ljeAG68ge6PP429G28P9uVX5LrbjTPG8LizZP8uM=, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
2024/12/03 12:10:39 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 1.0s
2024/12/03 12:10:39 DEBUG : 7 go routines active
2024/12/03 12:10:39 NOTICE: Failed to copy: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 29MW5BPM1HE3FXKR, HostID: gjfdWj1YRuY3r/gGrx3l2UtB/hheJi7HCbxbIpIsxeExyEr15rVbCGQPOye5Q6xjr04ljeAG68ge6PP429G28P9uVX5LrbjTPG8LizZP8uM=, api error IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
Please note, that I have redacted the bucket names in the command and that as stated above the same works with the AWS CLI v2 using exactly the same credentials:
aws s3 cp s3://<source_bucket>/demo/20s.mp3 s3://<dst_bucket>/tst2/