gcyre
June 2, 2023, 7:03pm
1
What is the problem you are having with rclone?
getting intermittent 500 errors when syncing an s3 bucket to Wasabi us-east-1
Run the command 'rclone version' and share the full output of the command.
rclone version
rclone v1.62.2
os/version: ubuntu 20.04 (64 bit)
os/kernel: 5.4.0-40-generic (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.20.2
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Source: generic S3 on-prem service
Destination: Wasabi us-east-1
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone --config /export/wasabi-sync/rclone.conf sync audio:audio wasabi-audio:audio --transfers 16 --checkers 16 --progress --exclude=/temp
The rclone config contents with secrets removed.
[audio]
type = s3
provider = Other
access_key_id = XXXXXXX
secret_access_key = XXXXXXXXXX
endpoint = s3.home.local
[wasabi-audio]
type = s3
provider = Wasabi
access_key_id = XXXXXXXX
secret_access_key = XXXXXXXX
endpoint = s3.wasabisys.com
A log from the command with the -vv
flag
2023/06/02 17:24:16 Failed to sync with 30 errors: last error was: march failed with 29 error(s): first error: InternalError: We encountered an internal error. Please retry the operation again later.
status code: 500, request id: DF87CF5BCDBC0A80, host id: fGzjcJOrV8/9OSsI1mrGoYxrjX5GaHREnR3DSbceWHfSj3I5Y0CTg7FSaFJYfJlxdenRuDUN+r2d
I had a similar issue with terraform which was fixed by updating the client to send authenticated headers.
terrabitz:master
← tobikris:fix-headbucket-auth
opened 10:26PM - 25 Mar 23 UTC
I discovered strange behavior with the new(ish) Wasabi region eu-central-2.
It … seems that some of their servers in this region are stricter than the others.
This probably sounds very strange - it certainly was hard to debug and pinpoint.
I think that some servers deny HeadBucket requests without authentication, while others are allowing them. Even though I am totally confused by Wasabi's behavior and disappointed by their support on this issue, this PR solves the issue for me by adding authentication to the request.
The issue can be observed with this example:
```
provider "wasabi" {
region = "eu-central-2"
skip_requesting_account_id = true
skip_credentials_validation = true
skip_metadata_api_check = true
endpoints {
s3 = "https://s3.eu-central-2.wasabisys.com"
iam = "https://iam.wasabisys.com"
sts = "https://sts.wasabisys.com"
}
}
resource "wasabi_bucket" "test" {
bucket = "test-eu-central-2-a0dbawpwd"
}
```
After the initial apply I observed the following two cases - in seemingly random fashion:
Success:
```
2023-03-25T18:53:33.259+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:53:33 [DEBUG] [aws-sdk-go] DEBUG: Validate Response s3/GetBucketLifecycleConfiguration failed, attempt 0/25, error NoSuchLifecycleConfiguration: The lifecycle configuration does not exist
status code: 404, request id: 761B7D272F17CF52:A, host id: iygoWM5ByNFJuDqhQrKnEDEYRc3rFjFWMgBQUgJqJ2oRfIgmcQbc9EUCFk6HqL77EsQtsUm8KzVO: timestamp=2023-03-25T18:53:33.259+0100
2023-03-25T18:53:33.259+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:53:33 [DEBUG] Waiting for state to become: [success]: timestamp=2023-03-25T18:53:33.259+0100
2023-03-25T18:53:33.260+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:53:33 [DEBUG] [aws-sdk-go] DEBUG: Request s3/HeadBucket Details:
---[ REQUEST POST-SIGN ]-----------------------------
HEAD /test-eu-central-2-a0dbawpwd HTTP/1.1
Host: s3.eu-central-2.wasabisys.com
User-Agent: aws-sdk-go/1.34.26 (go1.16.15; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/1.4.1 (+https://www.terraform.io)
-----------------------------------------------------: timestamp=2023-03-25T18:53:33.259+0100
2023-03-25T18:53:34.308+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:53:34 [DEBUG] [aws-sdk-go] DEBUG: Response s3/HeadBucket Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Connection: close
Content-Type: application/xml
Date: Sat, 25 Mar 2023 17:53:34 GMT
Server: WasabiS3/7.12.1004-2023-02-17-7ff2f5bdd9 (head3)
X-Amz-Bucket-Region: eu-central-2
X-Amz-Id-2: DTImrGgxkz+NDzQGZ2Gn05iR5TtYCSt0mNx5BuI/piAdckE3FAuLwUZ9B0SLSf4CG2pzPDdN2ZEG
X-Amz-Request-Id: A8C5786BC2AAAC41
-----------------------------------------------------: timestamp=2023-03-25T18:53:34.307+0100
2023-03-25T18:53:34.308+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:53:34 [DEBUG] [aws-sdk-go]: timestamp=2023-03-25T18:53:34.308+0100
2023-03-25T18:53:34.313+0100 [WARN] Provider "registry.terraform.io/terrabitz/wasabi" produced an invalid plan for wasabi_bucket.test, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .acl: planned value cty.StringVal("private") for a non-computed attribute
- .force_destroy: planned value cty.False for a non-computed attribute
- .versioning: block count in plan (1) disagrees with count in config (0)
2023-03-25T18:53:34.314+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-03-25T18:53:34.317+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/terrabitz/wasabi/4.1.3/linux_amd64/terraform-provider-wasabi_v4.1.3 pid=2731245
2023-03-25T18:53:34.332+0100 [DEBUG] provider: plugin exited
2023-03-25T18:53:34.333+0100 [DEBUG] no planned changes, skipping apply graph check
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.
```
Error:
```
2023-03-25T18:54:12.463+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:54:12 [DEBUG] [aws-sdk-go] DEBUG: Validate Response s3/GetBucketLifecycleConfiguration failed, attempt 0/25, error NoSuchLifecycleConfiguration: The lifecycle configuration does not exist
status code: 404, request id: 005ABEF4F864FF73:B, host id: VP6OJ46u1aCLml9CNSumrZ7zXwtQC1Fnz8174F3w88KPZTeKBoWW1hKjvCQesAEIXdIdvtmabdSx: timestamp=2023-03-25T18:54:12.462+0100
2023-03-25T18:54:12.463+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:54:12 [DEBUG] Waiting for state to become: [success]: timestamp=2023-03-25T18:54:12.462+0100
2023-03-25T18:54:12.463+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:54:12 [DEBUG] [aws-sdk-go] DEBUG: Request s3/HeadBucket Details:
---[ REQUEST POST-SIGN ]-----------------------------
HEAD /test-eu-central-2-a0dbawpwd HTTP/1.1
Host: s3.eu-central-2.wasabisys.com
User-Agent: aws-sdk-go/1.34.26 (go1.16.15; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/1.4.1 (+https://www.terraform.io)
-----------------------------------------------------: timestamp=2023-03-25T18:54:12.463+0100
2023-03-25T18:54:12.537+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:54:12 [DEBUG] [aws-sdk-go] DEBUG: Response s3/HeadBucket Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 403 Forbidden
Connection: close
Content-Type: application/xml
Date: Sat, 25 Mar 2023 17:54:12 GMT
Server: WasabiS3/7.12.1004-2023-02-17-7ff2f5bdd9 (R204-U11)
X-Amz-Id-2: xXag44oeqipeke6ZDlGjztH8FEod/h32lAgDdefTOYQCBCKQyxRdtZArEtRDSXk6dkeXCxOfFedi
X-Amz-Request-Id: A784DC286A189ABD:A
-----------------------------------------------------: timestamp=2023-03-25T18:54:12.537+0100
2023-03-25T18:54:12.537+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:54:12 [DEBUG] [aws-sdk-go]: timestamp=2023-03-25T18:54:12.537+0100
2023-03-25T18:54:12.537+0100 [INFO] provider.terraform-provider-wasabi_v4.1.3: 2023/03/25 18:54:12 [DEBUG] [aws-sdk-go] DEBUG: Validate Response s3/HeadBucket failed, attempt 0/25, error Forbidden: Forbidden
status code: 403, request id: A784DC286A189ABD:A, host id: xXag44oeqipeke6ZDlGjztH8FEod/h32lAgDdefTOYQCBCKQyxRdtZArEtRDSXk6dkeXCxOfFedi: timestamp=2023-03-25T18:54:12.537+0100
2023-03-25T18:54:12.538+0100 [ERROR] vertex "wasabi_bucket.test" error: error getting S3 Bucket location: Forbidden: Forbidden
status code: 403, request id: A784DC286A189ABD:A, host id: xXag44oeqipeke6ZDlGjztH8FEod/h32lAgDdefTOYQCBCKQyxRdtZArEtRDSXk6dkeXCxOfFedi
2023-03-25T18:54:12.538+0100 [ERROR] vertex "wasabi_bucket.test (expand)" error: error getting S3 Bucket location: Forbidden: Forbidden
status code: 403, request id: A784DC286A189ABD:A, host id: xXag44oeqipeke6ZDlGjztH8FEod/h32lAgDdefTOYQCBCKQyxRdtZArEtRDSXk6dkeXCxOfFedi
╷
│ Error: error getting S3 Bucket location: Forbidden: Forbidden
│ status code: 403, request id: A784DC286A189ABD:A, host id: xXag44oeqipeke6ZDlGjztH8FEod/h32lAgDdefTOYQCBCKQyxRdtZArEtRDSXk6dkeXCxOfFedi
│
│ with wasabi_bucket.test,
│ on tfbackend.tf line 25, in resource "wasabi_bucket" "test":
│ 25: resource "wasabi_bucket" "test" {
```
I should note this is a large bucket with over 130TB of data and takes several hours to sync
Could this be a similar issue?
ncw
(Nick Craig-Wood)
June 3, 2023, 10:29pm
2
A 500 error is a server problem at Wasabi. Trying again is the best thing to try next .
If the errors continue then I'd report them to Wasabi.
gcyre
June 5, 2023, 11:05am
3
Hi Nick
thanks for the response, agreed it's most likely an issue on the Wasabi side but I wonder if its related to the article I posted about some Wasabi servers needing authentication and an update to rclone is needed to support this
thanks
asdffdsa
(jojothehumanmonkey)
June 5, 2023, 1:17pm
4
hi,
i have never experienced that issue with rclone+wasabi.
you are sure the issue is with wasabi, not the on=prem s3 server?
have you contacted wasabi tech support?
i found a wasabi bug, they have yet to fix it but they were quick to test and confirm the bug.
https://forum.rclone.org/t/in-some-cases-rclone-does-not-use-etag-to-verify-files/36095/11?u=asdffdsa
gcyre
June 5, 2023, 7:26pm
5
hey, thanks for the information. I'm not sure if this error is related, the error I get points to the destination. Based on this it looked similar to the issues with that terraform plugin
2023-06-05 19:18:55 ERROR : audio: error reading destination directory: InternalError: We encountered an internal error. Please retry the operation again later.
status code: 500, request id: BD84686882BE92CB:A, host id: sJIDk3deVqwZDy38Ein6q8rprTGmsl6z+bgJu5pPIKm3KFABOCIZ98yTKg7jQzgoq2rY4TnOG+fK
asdffdsa
(jojothehumanmonkey)
June 5, 2023, 7:50pm
6
with 130TB at wasabi, you should be able to get a decent repsonse from wasabi.
system
(system)
Closed
July 5, 2023, 7:50pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.