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

S3Error: Invalid Request (invalid hostname) occurs when a Docker container has a valid hostname that includes an _ underscore. #1362

Open
Trucker9 opened this issue Nov 30, 2024 · 0 comments

Comments

@Trucker9
Copy link

Hi,

I tried to connect to the MinIO container that I deployed locally using the following configuration:

  minio_pishrun:
    image: minio/minio:latest
    container_name: minio_pishrun
    ports:
      - "9000:9000"
      - "9001:9001" 
    environment:
      MINIO_ROOT_USER: "something"
      MINIO_ROOT_PASSWORD: "something"
    command: server /data --console-address ":9001"
    volumes:
      - minio_pishrun_data:/data

I created a client instance as:

export const minioClient = new Minio.Client({
  // ...
  endPoint: 'minio_pishrun',
  // ...
});

However, I encountered the error S3Error: Invalid Request (invalid hostname) every time I tried to perform an operation.

After some research, I came across a similar issue in the Python package.) Following the solution mentioned there, I removed the underscore from the name and used minoPishrun instead, which resolved the issue.

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