Built minio service, support https, python call reported error.
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xx.xx.xx.xxx', port=9000): Max retries exceeded with url: /allstruct?location= (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)')))
Ignore the certificate error issue and try out the demo script
import os
from minio import Minio
import urllib3
from urllib.parse import urlparse
import certifi
from minio.commonconfig import REPLACE, CopySource
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
minio_endpoint = os.getenv("MINIO_ENDPOINT", "https://xxx.xxx.xxx.xxx:9000")
secure = True
minio_endpoint = urlparse(minio_endpoint)
if minio_endpoint.scheme == 'https':
secure = True
ok_http_client=urllib3.PoolManager(
timeout=urllib3.util.Timeout(connect=10, read=10),
maxsize=10,
cert_reqs='CERT_NONE',
ca_certs= os.environ.get('SSL_CERT_FILE') or certifi.where(),
retries=urllib3.Retry(
total=5,
backoff_factor=0.2,
status_forcelist=[500, 502, 503, 504]
)
)
minioClient = Minio(minio_endpoint.netloc,
access_key='username',
secret_key='password',
http_client=ok_http_client,
secure=secure)
print(minioClient.list_buckets())
Read More:
- SSL error of urllib3 when Python uploads files using Minio
- Python Error: certificate verify failed: certificate has expired
- python3 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) Error
- Pycharm WebSocket Error: Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- Python Error aiohttp.client_exceptions.ClientConnectorCertificateError, Cannot connect to host:443
- [Solved] ssl_client_socket_impl.cc handshake failed (Same Codes in Different Environments)
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- [Solved] selenium Error: ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed
- Python Error: pip install mysql-connector-python failed
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- [Solved] HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/saved_model
- [Solved] Huawei OBS Python SDK download picture error: nosuchkey
- Python 3 urllib has no URLEncode attribute
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- Python: How to Disable InsecureRequestWarning error
- Python Error: Failed to establish a new connection: [Errno -2] Name or service not known
- Python exports the gitlab project
- Python netmiko library Cisco telnet switch automation
- Python raspberry pie starts sending IP address to mailbox