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

Connection Refused Error #98

Open
ya1220 opened this issue Oct 7, 2021 · 0 comments
Open

Connection Refused Error #98

ya1220 opened this issue Oct 7, 2021 · 0 comments

Comments

@ya1220
Copy link

ya1220 commented Oct 7, 2021

Hi Todd! Thank you very much for this amazing tutorial - this is great.

I'm trying to get it up and running and getting this error:

l addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.31.36.187:5000/ (Press CTRL+C to quit)
failed to send traces to Datadog Agent at http://localhost:8126
Traceback (most recent call last):
  File "/home/myusername/.local/lib/python3.9/site-packages/tenacity/__init__.py", line 407, in __call__
    result = fn(*args, **kwargs)
  File "/home/myusername/.local/lib/python3.9/site-packages/ddtrace/internal/writer.py", line 356, in _send_payload
    response = self._put(payload, headers)
  File "/home/myusername/.local/lib/python3.9/site-packages/ddtrace/internal/writer.py", line 332, in _put
    conn.request("PUT", self._endpoint, data, headers)
  File "/usr/lib/python3.9/http/client.py", line 1279, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1325, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1274, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1034, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib/python3.9/http/client.py", line 945, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/usr/lib/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/myusername/.local/lib/python3.9/site-packages/ddtrace/internal/writer.py", line 458, in flush_queue
    self._retry_upload(self._send_payload, encoded, n_traces)
  File "/home/myusername/.local/lib/python3.9/site-packages/tenacity/__init__.py", line 404, in __call__
    do = self.iter(retry_state=retry_state)
  File "/home/myusername/.local/lib/python3.9/site-packages/tenacity/__init__.py", line 361, in iter
    raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f021177dbb0 state=finished raised ConnectionRefusedError>]

UPDATE: removed import ddtrace and patch_all() - now it is working :)

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