raspberry-piminio

MinIO mc client Error: dial tcp: lookup minio on 192.168.2.254:53: no such host


I'm running a MinIO server instance on my Raspberry Pi 4 (cross compiled for ARMv7):

pi@raspberrypi:~ $ ./minio server data/
Endpoint: http://169.254.65.231:9000  http://192.168.2.49:9000  http://172.17.0.1:9000  http://172.18.0.1:9000  http://192.168.32.1:9000  http://127.0.0.1:9000               
RootUser: minioadmin 
RootPass: minioadmin 

Browser Access:
   http://169.254.65.231:9000  http://192.168.2.49:9000  http://172.17.0.1:9000  http://172.18.0.1:9000  http://192.168.32.1:9000  http://127.0.0.1:9000              

Command-line Access: https://docs.min.io/docs/minio-client-quickstart-guide
   $ mc alias set myminio http://169.254.65.231:9000 minioadmin minioadmin

Object API (Amazon S3 compatible):
   Go:         https://docs.min.io/docs/golang-client-quickstart-guide
   Java:       https://docs.min.io/docs/java-client-quickstart-guide
   Python:     https://docs.min.io/docs/python-client-quickstart-guide
   JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
   .NET:       https://docs.min.io/docs/dotnet-client-quickstart-guide
Detected default credentials 'minioadmin:minioadmin', please change the credentials immediately using 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD'
IAM initialization complete

On the same Pi, I then run the Minio Client with mc config host add ... :

pi@raspberrypi:~/code/pi_eye $ mc config host add minio "http://minio:9000" minioadmin minioadmin --api S3V4
Added `minio` successfully.

After this however, I'm stuck with this error:

pi@raspberrypi:~/code/pi_eye $ mc ls minio
mc: <ERROR> Unable to list folder. Get "http://minio:9000/": dial tcp: lookup minio on 192.168.2.254:53: no such host

Likewise, if I try to access the Minio server using the Python API, I run into the same issue.

So far, I only found quite obscure solutions in other forums, but none worked for my problem.

Thanks for any help! :)


Solution

  • When the server starts it shows you a list of available interfaces you can connect to, e.g.,:

    http://169.254.65.231:9000  http://192.168.2.49:9000  http://172.17.0.1:9000  http://172.18.0.1:9000  http://192.168.32.1:9000  http://127.0.0.1:9000   
    

    When you added the alias to mc, it should have been for one of these interfaces, e.g., mc alias set myminio http://192.168.2.49:9000 . In your case you did mc config host add minio "http://minio:9000". Checking the error you pasted, it seems to be complaining about not being able to do a DNS lookup for a host named "minio", so you should either:

    So, seems like a simple issue with name resolution, clear that up and you should be able to connect.