Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [AWS S3] Incorrect handling 301 error for specifying AWS region explicit: BucketRegionError: incorrect region #108

Open
bas-kirill opened this issue Mar 11, 2024 · 0 comments

Comments

@bas-kirill
Copy link

bas-kirill commented Mar 11, 2024

EC2 configuration:

  • AMI name: ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-20240207.1
  • Instance type: t4g.micro

During mounting using command:

./geesefs --no-checksum --memory-limit 4000 --max-flushers 32 --max-parallel-parts 32 --part-sizes 25 --file-mode=0666 --dir-mode=0777 --region eu-west-1 --endpoint https://s3.amazonaws.com kirill.bas /tmp/geesefs2

Got an error:

main.FATAL Mounting file system: Unable to access 'kirill.bas': BucketRegionError: incorrect region, the bucket is not in 'eu-west-1' region at endpoint 'https://s3.amazonaws.com'
        status code: 301, request id: , host id: 

My bucket at eu-west-1:
image

But if I use command without --region eu-west-1 everything works ok: s3.INFO Switching from region 'us-east-1' to 'eu-west-1' main.INFO File system has been successfully mounted.

./geesefs --no-checksum --memory-limit 4000 --max-flushers 32 --max-parallel-parts 32 --part-sizes 25 --file-mode=0666 --dir-mode=0777 --endpoint https://s3.amazonaws.com kirill.bas /tmp/geesefs

Steps to reproduce error:

  1. Install geesefs:
sudo su

apt update -y
apt install golang-go -y  # installing "go" cli command
git clone https://github.com/yandex-cloud/geesefs /home/ubuntu/geesefs
cd /home/ubuntu/geesefs
go build
  1. Create mount folder: mkdir /tmp/geesefs
  2. Mount: ./geesefs --no-checksum --memory-limit 4000 --max-flushers 32 --max-parallel-parts 32 --part-sizes 25 --file-mode=0666 --dir-mode=0777 --endpoint https://s3.amazonaws.com <bucket-name> /tmp/geesefs

Expected Result: S3 mounted at /tmp/geesefs

Actual Result: got an error main.FATAL Mounting file system: Unable to access 'kirill.bas': BucketRegionError: incorrect region, the bucket is not in 'eu-west-1' region at endpoint 'https://s3.amazonaws.com' status code: 301, request id: , host id:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant