mc icon indicating copy to clipboard operation
mc copied to clipboard

[not our bug] mc admin return 301 response missing Location header

Open Guoyoyo opened this issue 6 years ago • 4 comments

Expected behavior

I can run mc admin sub-commands to perform administrative tasks normally.

Current Behavior

I deploy minio with aws s3 gateway on k8s.
For now, I could connect Minio browser and perform minio client UNIX commands like ls, cat, cp.
But, minio admin sub-commands are failed.

Steps to reproduce the behavior

docker run -it --entrypoint=/bin/sh minio/mc
mc alias set minio https://s3.amazonaws.com <access_key> <secret_key>  #Added `minio` successfully.
mc admin user add minio nick nick12345

It got stuck for a long time before popping up an error message like the following: mc: <ERROR> Unable to add new user. Put "https://s3.amazonaws.com/minio/admin/v3/add-user?accessKey=nick": 301 response missing Location header

mc --version

  • (paste output of mc --version) mc version RELEASE.2020-10-03T02-54-56Z

System information

Minio is deployed by helm chart values.yaml to generate a k8s.yaml and then kubectl apply app on k8s cluster. mc is running by docker run command to create a container on Ubuntu 18.04 LTS. I also try to run nginx pod on k8s and install mc, but get the same error.

Guoyoyo avatar Nov 05 '20 07:11 Guoyoyo

docker run -it --entrypoint=/bin/sh minio/mc mc alias set minio https://s3.amazonaws.com <access_key> <secret_key> #Added minio successfully. mc admin user add minio nick nick12345

mc admin commands are only for MinIO servers not AWS S3

harshavardhana avatar Nov 05 '20 07:11 harshavardhana

Hello, @harshavardhana Thanks for your quick reply. Last time, I deploy minio and ceph with s3 gateway. The mc admin commands could be work. The same s3 gateway, AWS S3 doesn't support mc admin, does it? Or my endpoint settings are wrong??

Guoyoyo avatar Nov 05 '20 07:11 Guoyoyo

If AWS S3 gateway not support minio admin commands, how can I add multi-user and policys for other users usage and login to Minio browser? By AWS console like IAM to add users ??? oh..no I hope this is not true.

Guoyoyo avatar Nov 05 '20 07:11 Guoyoyo

If AWS S3 gateway not support minio admin commands, how can I add multi-user and policys for other users usage and login to Minio browser? By AWS console like IAM to add users ??? oh..no I hope this is not true.

You can you need to talk to running MinIO endpoint not AWS S3. You need to also configure etcd to configure users on S3 gateway.

Please join us on https://slack.min.io for answers to these questions.

harshavardhana avatar Nov 05 '20 07:11 harshavardhana