I installed local minio storage:
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
./minio server /home/myuser/minio_storage --console-address ":5050"
I'm trying to connect and create new bucket:
client = Minio("127.0.0.1:5050")
found = client.bucket_exists("my_bucket")
if not found:
client.make_bucket("my_bucket")
else:
print("Bucket 'my_bucket' already exists")
And I'm getting error:
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=5050): Max retries exceeded with url: /my_buket (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:852)'
What do I need to do in order to create new bucket ?
You've started the minio service without TLS enabled and so the service is running on the HTTP protocol on port 5050.
You therefore need to tell the client to connect using HTTP also by using the secure=False option as documented
client = Minio("127.0.0.1:5050", secure=False)
Or configure the server to be running with TLS which is the better option which is also documented.
I had the same problem and adding secure=False to the constructor of the minio client fixed it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With