self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

httpcore.ConnectError: [Errno -2] Name or service not known

Open alexspedan opened this issue 6 months ago • 1 comments

Self-Hosted Version

25.4.0

CPU Architecture

k8s

Docker Version

28.0.1, build 068a01e

Docker Compose Version

2.33.1

Machine Specification

  • [x] My system meets the minimum system requirements of Sentry

Steps to Reproduce

I have one missing component I guess. Probably sentry-web or sentry-worker. My sentry is deployed to k8s cluster and all the deployments are up and running.

Expected Result

Sending envelope [envelope with 1 items (error)] project:3 host:test-host with no errors

Actual Result

14:58:17 [ERROR] sentry_sdk.errors: Internal error in sentry_sdk Traceback (most recent call last): File "/.venv/lib/python3.13/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions yield File "/.venv/lib/python3.13/site-packages/httpcore/_backends/sync.py", line 206, in connect_tcp sock = socket.create_connection( address, timeout, source_address=source_address, ) File "/usr/local/lib/python3.13/socket.py", line 840, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/socket.py", line 975, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -2] Name or service not known The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/.venv/lib/python3.13/site-packages/sentry_sdk/transport.py", line 563, in send_envelope_wrapper self._send_envelope(envelope) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/sentry_sdk/transport.py", line 497, in _send_envelope self._send_request( ~~~~~~~~~~~~~~~~~~^ body.getvalue(), ^^^^^^^^^^^^^^^^ ...<2 lines>... envelope=envelope, ^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/sentry/src/sentry/utils/sdk.py", line 274, in patched_send_request return _send_request(*args, **kwargs) File "/.venv/lib/python3.13/site-packages/sentry_sdk/transport.py", line 349, in _send_request response = self._request( "POST", ...<2 lines>... headers, ) File "/.venv/lib/python3.13/site-packages/sentry_sdk/transport.py", line 763, in _request response = self._pool.request( method, ...<2 lines>... headers=headers, # type: ignore ) File "/.venv/lib/python3.13/site-packages/httpcore/_sync/interfaces.py", line 43, in request response = self.handle_request(request) File "/.venv/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 268, in handle_request raise exc File "/.venv/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 251, in handle_request response = connection.handle_request(request) File "/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 99, in handle_request raise exc File "/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 76, in handle_request stream = self._connect(request) File "/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 124, in _connect stream = self._network_backend.connect_tcp(**kwargs) File "/.venv/lib/python3.13/site-packages/httpcore/_backends/sync.py", line 205, in connect_tcp with map_exceptions(exc_map): ~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/local/lib/python3.13/contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "/.venv/lib/python3.13/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectError: [Errno -2] Name or service not known 14:58:17 [ERROR] sentry_sdk.errors: Internal error in sentry_sdk

Could anybody help to investgate how to fix this issue. First it looks like a good idea to identfy which exact service has the issue?

Event ID

No response

alexspedan avatar Jun 02 '25 15:06 alexspedan

The error is so vague.

Sending envelope [envelope with 1 items (error)] project:3 host:test-host with no errors

Where did you see this error?

How did you deploy your Sentry on k8s? Are you using an operator (like this one https://github.com/kanadaj/sentry-operator), or are you using the helm chart (https://github.com/sentry-kubernetes/charts)?

aldy505 avatar Jun 05 '25 02:06 aldy505

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Jun 26 '25 07:06 getsantry[bot]