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

Getting error "urlopen error [Errno -5] No address associated with hostname" #1182

Open
PrajwalNaik07 opened this issue Oct 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@PrajwalNaik07
Copy link

PrajwalNaik07 commented Oct 16, 2024

I am running my slack app on the GCP kubernetes environment in socket mode, with 10 sockets open simultaneously.

Lately we have seen the bot failing to work and gives the following error:

Failed to send a request to Slack API server: <urlopen error [Errno -5] No address associated with hostname>
2024-10-15 22:56:18 UTC [INFO] A retry handler found: ConnectionErrorRetryHandler for POST https://slack.com/api/reactions.get - <urlopen error [Errno -5] No address associated with hostname>
2024-10-15 22:56:19 UTC [INFO] Going to retry the same request: POST https://slack.com/api/reactions.get
2024-10-15 22:56:19 UTC [ERROR] Failed to send a request to Slack API server: <urlopen error [Errno -5] No address associated with hostname>
2024-10-15 22:56:19 UTC [ERROR] Failed to run listener function (error: <urlopen error [Errno -5] No address associated with hostname>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/urllib/request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/local/lib/python3.9/http/client.py", line 1285, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.9/http/client.py", line 1331, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.9/http/client.py", line 980, in send
    self.connect()
  File "/usr/local/lib/python3.9/http/client.py", line 1447, in connect
    super().connect()
  File "/usr/local/lib/python3.9/http/client.py", line 946, in connect
    self.sock = self._create_connection(
  File "/usr/local/lib/python3.9/socket.py", line 823, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

**Using python packege versions:

slack_bolt==1.19.0
slack_sdk==3.30.0**

Could you let us know the cause and resolution for the same

@seratch seratch added the question Further information is requested label Oct 16, 2024
@seratch
Copy link
Member

seratch commented Oct 16, 2024

Hi @PrajwalNaik07, the "No address associated with hostname" error indicates an issue with DNS resolution or something like that within your Kubernetes cluster network infra. Searching by "No address associated with hostname" on the internet will help you find many Q&A threads on this topic.

Unfortunately, we're unable to provide more specific guidance on this topic. I hope you find a suitable solution soon!

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

No branches or pull requests

2 participants