7

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

Tuz
  • 1,810
  • 5
  • 29
  • 58

2 Answers2

4

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.

ORHAN ERDAY
  • 1,020
  • 8
  • 31
silvercondor
  • 79
  • 1
  • 6
1

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

phil
  • 225
  • 1
  • 4
  • 13