docker -minio - The access key ID you provided does not exist in our records
Asked Answered
S

2

13

I have a docker file that should wait for a database with wait_for_it.sh and run a minio server.

I read the secrets from run/secrets and creates the MINIO_SECRET_KEY and MINIO_ACCESS_KEY.

THE MINIO SERVER is up but I cannot connect with a minio client (js client) and I GOT the following error:

The access key ID you provided does not exist in our records

My client code:

      const accessKey = fileService.readFile(configService.get('minio').access_key_file);
        const secretKey = fileService.readFile(configService.get('minio').secret_key_file);

    this.minioClient = new Minio.Client({
                endPoint: configService.get('minio').host,
                port: configService.get('minio').port,
                useSSL: configService.get('minio').useSSL,
                accessKey: accessKey.trim(),
                secretKey: secretKey.trim()
            });

my docker entry point (bash):

docker_secrets_env() {
    ACCESS_KEY_FILE="$MINIO_ACCESS_KEY_FILE"
    SECRET_KEY_FILE="$MINIO_SECRET_KEY_FILE"

    if [ -f "$ACCESS_KEY_FILE" ] && [ -f "$SECRET_KEY_FILE" ]; then
        if [ -f "$ACCESS_KEY_FILE" ]; then
            MINIO_ACCESS_KEY="$(cat "$ACCESS_KEY_FILE")"
            export MINIO_ACCESS_KEY
        fi
        if [ -f "$SECRET_KEY_FILE" ]; then
            MINIO_SECRET_KEY="$(cat "$SECRET_KEY_FILE")"
            export MINIO_SECRET_KEY
        fi
    fi
}

docker_secrets_env

./wait-for-it.sh mongo:27017 --timeout=0 --strict -- \
    minio server /data  & \

thanks

Sake answered 14/12, 2019 at 21:16 Comment(2)
I've hit the same error. Did you find the solution here?Bolivar
any solution by any means?Leifleifer
T
7

Try to access it directly at localhost:9000 with your preset credentials,

if that doesn't work try default credentials :

user: minioadmin
PWD: minioadmin

if this works it means the docker image wasn't run properly.

Troglodyte answered 16/2, 2021 at 4:59 Comment(0)
P
4

I had the same issue and I resolved it by using a username and password which contained lowercase and uppercase letters, a digit and punctuation. So the problem could just be that your username and password are not meeting the minimum password requirements

Piranesi answered 11/3, 2023 at 13:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.