requests.exceptions.SSLError: HTTPSConnectionPool(host=‘telemetry.crewai.com’, port=4319): Max retries exceeded with url: /v1/traces (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)’)))
I’m facing the same issue as well.
I am also facing the same issue
Probably the CrewAI telemetry servers certificate that has expired, you will get errors in your console but these shouldn’t stop your crews from running.
Hopefully the team will update the certificate soon.
Same observation here … telemetry cert is expired :
error is gone for me by disabling telemetry : OTEL_SDK_DISABLED=True
Similar problem: ERROR:opentelemetry.sdk.trace.export:Exception while exporting Span batch.
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py”, line 464, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py”, line 1093, in _validate_conn
conn.connect()
File “/usr/local/lib/python3.11/dist-packages/urllib3/connection.py”, line 741, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/urllib3/connection.py”, line 920, in ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/urllib3/util/ssl.py", line 460, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/urllib3/util/ssl.py", line 504, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/ssl.py”, line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/ssl.py”, line 1104, in _create
self.do_handshake()
File “/usr/lib/python3.11/ssl.py”, line 1382, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py”, line 787, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py”, line 488, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/requests/adapters.py”, line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py”, line 841, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/urllib3/util/retry.py”, line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘telemetry.crewai.com’, port=4319): Max retries exceeded with url: /v1/traces (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)’)))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/opentelemetry/sdk/trace/export/init.py”, line 360, in _export_batch
self.span_exporter.export(self.spans_list[:idx]) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py”, line 189, in export
return self._export_serialized_spans(serialized_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py”, line 159, in _export_serialized_spans
resp = self._export(serialized_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py”, line 133, in _export
return self._session.post(
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/requests/sessions.py”, line 637, in post
return self.request(“POST”, url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/requests/sessions.py”, line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/requests/sessions.py”, line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/requests/adapters.py”, line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘telemetry.crewai.com’, port=4319): Max retries exceeded with url: /v1/traces (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)’)))
but I am still getting this how can I fix it
SOLUTION
I am able to resolve this you just need to edit in crewai/telemetry
just put pass in the try catch function where endpoint is called
TEL_SDK_DISABLED=true in .env solves the problem
CrewAI utilizes anonymous telemetry to gather usage statistics with the primary goal of enhancing the library. Our focus is on improving and developing the features, integrations, and tools most utilized by our users.
are you not going to update the ssl for telemetry?
Is there a subscription or status.crewai to monitor/get updates on crewai system ? cc @rokbenko
there server is down, they will update the SSL
Telemetry.crewai.com is DOWN
timing on this fix? the env solve didn’t really work
This should be fixed now. Let us know if you’re still seeing an error.
I faced the same issue yesterday. Here is what I did to fix it.
(Also used an agent to format the answer )
Solution Steps
Export the Corporate Root Certificate
Visit any secure website (e.g., https://www.google.com
) using your corporate browser.
Click the lock icon → View Certificate.
Find and export the root certificate in .crt
(DER-encoded) format.
Example filename: Corp-Root-CA.crt
Convert
.crt
to .pem
(Optional but Recommended)
If your certificate is in .crt
(binary DER) format, convert it to .pem
(Base64):
Using OpenSSL (Installed via Chocolatey)
openssl x509 -in Corp-Root-CA.crt -out Corp-Root-CA.pem
Now you have a
Corp-Root-CA.pem
file that’s compatible with certifi
.
Locate Python’s
certifi
CA Bundle
Find where Python stores the CA bundle used by requests
:
import certifi print(certifi.where())
You’ll get something like:
C:\Users\YourName\AppData\Local\Programs\Python\Python39\Lib\site-packages\certifi\cacert.pem
Append the Corporate Certificate to certifi
Open the cacert.pem
file in a text editor (like VS Code or Notepad++).
Copy and append the contents of your Corp-Root-CA.pem
file at the end.
Save the file.
Set the
REQUESTS_CA_BUNDLE
Environment Variable
Tell Python to always use your updated CA bundle from the “.env” file.
REQUESTS_CA_BUNDLE=C:\Path\To\Your\Python\Lib\site-packages\certifi\cacert.pem
Verify It Works
Now your requests should succeed without extra parameters:
import requests response = requests.get(“https://www.google.com”) print(response.status_code)
I am still facing the same issue , after following all the steps provided above
│ Tool Usage Failed │
│ Name: Search the internet with Serper │
│ Error: HTTPSConnectionPool(host=‘google.serper.dev’, port=443): Max retries exceeded with url: /search (Caused by │
│ SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate │
│ (_ssl.c:1010)’)))
can you try updating your macOS certificates?
if you have Homebrew try running:
brew install ca-certificates
or
pip install --upgrade certifi
Make sure when you fetch the cert from the lock icon, you get the parent cert (highest in hierarchy).
No luck same issue
Crew: crew
└── Task: e3912b28-f295-48d8-a460-316097dcb45e
Status: Executing Task…
└── Failed Search the internet with Serper (3)
╭─────────────────────────────────────────────────────────── Tool Error ────────────────────────────────────────────────────────────╮
│ │
│ Tool Usage Failed │
│ Name: Search the internet with Serper │
│ Error: HTTPSConnectionPool(host=‘google.serper.dev’, port=443): Max retries exceeded with url: /search (Caused by │
│ SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer │
│ certificate (_ssl.c:1010)’))) │
│ │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
I encountered an error while trying to use the tool. This was the error: HTTPSConnectionPool(host=‘google.serper.dev’, port=443): Max retries exceeded with url: /search (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)’))).
Tool Search the internet with Serper accepts these inputs: Tool Name: Search the internet with Serper
Tool Arguments: {‘search_query’: {‘description’: ‘Mandatory search query you want to use to search the internet’, ‘type’: ‘str’}}
Tool Description: A tool that can be used to search the internet with a search_query. Supports different search types: ‘search’ (default), ‘news’