Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting '[SSL: WRONG_VERSION_NUMBER] wrong version number when working with minio?

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 ?

like image 901
user3668129 Avatar asked May 12 '26 18:05

user3668129


2 Answers

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.

like image 130
Brian Sidebotham Avatar answered May 14 '26 08:05

Brian Sidebotham


I had the same problem and adding secure=False to the constructor of the minio client fixed it for me.

like image 27
SBylemans Avatar answered May 14 '26 09:05

SBylemans



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!