Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl certificate issue #1209

Open
sivajik34 opened this issue Aug 21, 2024 · 1 comment
Open

ssl certificate issue #1209

sivajik34 opened this issue Aug 21, 2024 · 1 comment

Comments

@sivajik34
Copy link

I have created an Oauth system integration using the latest Magento docker 2.4.7 and connected with Apache airflow (https://github.com/sivajik34/magento-airflow) and getting the below issue.

also, i ran below two commands but it is not working
bin/setup-ssl: Generate an SSL certificate for one or more domains. Ex. bin/setup-ssl magento.test foo.test
bin/setup-ssl-ca: Generate a certificate authority and copy it to the host.

[2024-08-21T18:26:44.272+0530] {magento.py:38} ERROR - AirflowException occurred: Request failed: HTTPSConnectionPool(host='magento.test', port=443): Max retries exceeded with URL: /rest/default/V1/products/product_sku_1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')))

[2024-08-21T18:26:44.297+0530] {taskinstance.py:3301} ERROR - Task failed with exception

Traceback (most recent call last):

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/connectionpool.py", line 466, in _make_request

self._validate_conn(conn)

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1095, in _validate_conn

conn.connect()

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/connection.py", line 652, in connect

sock_and_verified = _ssl_wrap_socket_and_match_hostname(

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/connection.py", line 805, in _ssl_wrap_socket_and_match_hostname

ssl_sock = ssl_wrap_socket(

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 465, in ssl_wrap_socket

ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 509, in _ssl_wrap_socket_impl

return ssl_context.wrap_socket(sock, server_hostname=server_hostname)

File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket

return self.sslsocket_class._create(

File "/usr/lib/python3.10/ssl.py", line 1100, in _create

self.do_handshake()

File "/usr/lib/python3.10/ssl.py", line 1371, in do_handshake

self._sslobj.do_handshake()

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen

response = self._make_request(

File "/home/sivakumar/magento-airflow/pyair/lib/python3.10/site-packages/urllib3/connectionpool.py", line 490, in _make_request

raise new_e

urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

@sivajik34
Copy link
Author

temp solution to continue work
requests.request(method, url, auth=self.oauth, json=data, verify=False)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant