Minio docker issues
I'm running Worklenz in a Proxmox container, accessing the app on http://192.168.1.64:5000. I can access the app and do most everything except upload to minio. I CAN access the minio browser at http://192.168.1.64:9001 and upload files to the worklenz bucket directly from there, but I cannot do anything through the app. I'm using the default storage settings (I tried swapping out minio for the container IP address, doesn't help):
Storage Configuration
STORAGE_PROVIDER=s3 AWS_REGION=us-east-1 AWS_BUCKET=worklenz-bucket AWS_ACCESS_KEY_ID=minioadmin AWS_SECRET_ACCESS_KEY=minioadmin S3_URL=http://minio:9000
Here's the error log:
Storage provider initialized: s3
Using endpoint: http://minio:9000
Bucket: your-bucket-name
Listening on port 3000
DbTaskStatusChangeListener connected.
[nOheivvyaJ8jBCJSAAAB] client registered
OPTIONS /api/v1/attachments/avatar 204 2.710 ms - 0
POST /api/v1/attachments/avatar 200 345.558 ms - 84
OPTIONS /api/v1/attachments/avatar 204 0.382 ms - 0
InvalidAccessKeyId: The Access Key Id you provided does not exist in our records.
at throwDefaultError (/app/node_modules/@smithy/smithy-client/dist-cjs/index.js:388:20)
at /app/node_modules/@smithy/smithy-client/dist-cjs/index.js:397:5
at de_CommandError (/app/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:5022:14)
at async /app/node_modules/@smithy/middleware-serde/dist-cjs/index.js:36:20
at async /app/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:484:18
at async /app/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
at async /app/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js:318:18
at async /app/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:110:22
at async /app/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:137:14
at async /app/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:33:22
at async uploadBufferToS3 (/app/build/shared/storage.js:93:9)
at async AttachmentController.createAvatarAttachment (/app/build/controllers/attachment-controller.js:38:23)
at async descriptor.value (/app/build/decorators/handle-exceptions.js:57:24) {
'$fault': 'client',
'$metadata': {
Storage provider initialized: s3
Using endpoint: http://minio:9000
Bucket: your-bucket-name
Listening on port 3000
DbTaskStatusChangeListener connected.
[nOheivvyaJ8jBCJSAAAB] client registered
OPTIONS /api/v1/attachments/avatar 204 2.710 ms - 0
POST /api/v1/attachments/avatar 200 345.558 ms - 84
OPTIONS /api/v1/attachments/avatar 204 0.382 ms - 0
InvalidAccessKeyId: The Access Key Id you provided does not exist in our records.
at throwDefaultError (/app/node_modules/@smithy/smithy-client/dist-cjs/index.js:388:20)
at /app/node_modules/@smithy/smithy-client/dist-cjs/index.js:397:5
at de_CommandError (/app/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:5022:14)
at async /app/node_modules/@smithy/middleware-serde/dist-cjs/index.js:36:20
at async /app/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:484:18
at async /app/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
at async /app/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js:318:18
at async /app/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:110:22
at async /app/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:137:14
at async /app/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:33:22
at async uploadBufferToS3 (/app/build/shared/storage.js:93:9)
at async AttachmentController.createAvatarAttachment (/app/build/controllers/attachment-controller.js:38:23)
at async descriptor.value (/app/build/decorators/handle-exceptions.js:57:24) {
'$fault': 'client',
'$metadata': {
httpStatusCode: 403,
requestId: '1855018F65798A21',
extendedRequestId: 'dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8',
cfId: undefined,
attempts: 1,
totalRetryDelay: 0
},
Code: 'InvalidAccessKeyId',
Key: 'avatars/secure/1002cd9a-9835-479b-9939-6f8df143e3ef.webp',
BucketName: 'your-bucket-name',
Resource: '/your-bucket-name/avatars/secure/1002cd9a-9835-479b-9939-6f8df143e3ef.webp',
RequestId: '1855018F65798A21',
HostId: 'dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8'
}
POST /api/v1/attachments/avatar 200 84.985 ms - 72
It seems from the error it's trying to connect to AWS and the "Bucket: your-bucket-name" in the error log looks funny. Been plugging away at it for hours, I'm stumped...
@realknotworking try updating Minio env variables in docker-compose.yml to match with backend env variables like this:
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID:-minioadmin}
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY:-minioadmin}
@realknotworking try updating Minio env variables in docker-compose.yml to match with backend env variables like this:
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID:-minioadmin} MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY:-minioadmin}
Thank you for the prompt response. Changed those as suggested, unfortunately it's the same error. The bucket gets created, I can access minio's browser @ 9001 and upload files directly to the bucket, just can't access/upload from the app. Nothing changed in the error log.
Could it be that the bucket name isn't passing correctly? The log line "Bucket: your-bucket-name" doesn't look right, but maybe that's just a placeholder.