2

I recently deployed Minio stand-alone on a K0s pod. I can successfully use mc on my laptop to authenticate and create a bucket on my pod’s ip:9000.

But when I try to access the web console and login I get a POST error to ip:9000 and I am unable to login.

Would anyone know what’s causing this?

user3720568
  • 31
  • 1
  • 3

1 Answers1

2

I've just started a minio container to verify this and it fact there are two ports you need to publish which are 9000 and 9001.

You can reach the admin console on port 9001 and the API on port 9000, hence your mc command which targets port 9000 works but trying to login on port 9000 fails.

MinIO admin console on port 9001

Edit

Now that I understand the problem better thanks to your comments I've tested on my Docker what happens when you login. And in fact there is a POST request happening when clicking on Login but it's not going to port 9001 not 9000, so it seems the your webconsole somehow issues request to the wrong port.

Here a screenshot of the Network tab in my DevTools showing the request that's being issued when I press Login. Chrome Dev Tools: Login request

I've copied the curl for this request from the DevTool and added the -i flag so you can see the HTTP response code. You could try this with your appropriate accessKey and secretKey of course.

curl -i 'http://localhost:9001/api/v1/login'   -H 'Connection: keep-alive'   -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36'   -H 'Content-Type: application/json'   -H 'Accept: */*'   -H 'Sec-GPC: 1'   -H 'Origin: http://localhost:9001'   -H 'Sec-Fetch-Site: same-origin'   -H 'Sec-Fetch-Mode: cors'   -H 'Sec-Fetch-Dest: empty'   -H 'Referer: http://localhost:9001/login'   -H 'Accept-Language: en-US,en;q=0.9'   -H 'Cookie: PGADMIN_LANGUAGE=en'   --data-raw '{"accessKey":"minio-root-user","secretKey":"minio-root-password"}'   --compressed

Expected result:

HTTP/1.1 204 No Content
Server: MinIO Console
Set-Cookie: token=AFMyDDQmtaorbMvSfaSQs5N+/9pYgK/rartN8SrGawE3ovm9AoJ5zz/eC9tnY7fRy5k4LChYcJKvx0rWyHr/+4XN2JnqdsT6VLDGI0cTasWiOo87ggj5WEv/cK4OyFlWiv5cJA8GUgQhVmYSk7MqPCVnBlfrvXhF7FaXhy85zAvzuGnExaBv9/8vZFs2LDiDF/9RX3Skb2gzIPIKije0++q4mwllluLIrhxyGrDgO16u33fWnPMjtbmGvsaOJAjx178h19BxbVnacBFyUv7ep+TFQ3xTRFfHefIMQK9lulMZOb5/oZUgEPolZpiB1Z9IJoNHVnUDJRnIIQXjv0bti/Wkz5RnWSoFqDjUWBopqFOuWYM/GMDCVxMrXJgQ/iDSg12b0uo6sOFbtvokyccUHKp5TtEznadzMf3Ga9iiZ4WAAXqONTC4ACMGaHxgUPVD7NvlYkyOlb/dPL75q0g3Qj+hiI5FELqPLEXgXMFHAi0EQDsNo4IXeqlxTJpxQYTUXRgrx1Kg6IlRJ5P9eIKwnj/eXmvXe4lvQSXR7iwEviBa1NVl1alLP0d7eib75IfhiMo7Hvyywg==; Path=/; Expires=Sat, 26 Mar 2022 13:23:34 GMT; Max-Age=3600; HttpOnly; SameSite=Lax
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Date: Sat, 26 Mar 2022 12:23:34 GMT
Connection: close
Mushroomator
  • 6,516
  • 1
  • 10
  • 27
  • I already am accessing the admin console on 9001. When I click login with the username and password I get a error. “POST to ip:9000 failed” – user3720568 Mar 26 '22 at 00:10
  • Current I have port 9000 and 9001 open on the pod and have 9001 forward to port 80. The error I get is “ Post "http://192.168.4.73:9000/": dial tcp 192.168.4.73:9000: i/o timeout” – user3720568 Mar 26 '22 at 00:12
  • Which container images are you using? `bitnami/minio` or `minio/minio`? Might be some missing config there. Certainly looks like some problem with routing. Does it work without the forward? – Mushroomator Mar 26 '22 at 00:18
  • I am using minio/minio. let me modify the svc to just use 9001 and 9000 and get back to you. – user3720568 Mar 26 '22 at 00:28
  • Just modified my ports to use 9001 and 9000 and still same issue – user3720568 Mar 26 '22 at 03:11
  • Try the `curl` command from above (with keys/ IP adjusted of course) to port `9001`. That should work. If it does you would then just need to figure out why your minio tries to connect to port `9000` and not `9001`. – Mushroomator Mar 26 '22 at 18:41