I’m encountering a persistent network connection issue with my n8n instance hosted on a Hugging Face Space, and I’m hoping for some guidance.
Problem Description: My n8n workflow, which includes a node attempting to interact with the Telegram Bot API, is consistently failing with connection errors. The primary and most specific error I’m seeing repeatedly is:
The connection cannot be established, this usually occurs due to an incorrect host (domain) value getaddrinfo ENOTFOUND api.telegram.org
This error suggests a DNS resolution failure for api.telegram.org specifically from within the Hugging Face Space environment.
Context:
Application: n8n
Hosting: Hugging Face Spaces
Goal: The n8n workflow needs to make outbound HTTP requests to api.telegram.org.
Troubleshooting Steps Taken:
Verified Target Host: I’ve meticulously checked the api.telegram.org URL in my n8n Telegram node configuration for any typos, and it appears correct.
External Reachability: I’ve confirmed that api.telegram.org is perfectly reachable and resolvable from my local machine (e.g., via ping and web browser).
Wait and Retry: I’ve waited for some time and retried running the workflow, but the error persists.
Space Restart/Redeploy: I have tried restarting/re-deploying my Hugging Face Space to clear any transient environment issues.
Hugging Face Status Page: I’ve checked the Hugging Face status page and haven’t found any reported widespread network issues.
Given that the error is explicitly getaddrinfo ENOTFOUND api.telegram.org and my Space is unable to resolve this common domain, it seems like there might be an underlying DNS or network configuration issue specific to my Space’s environment.
Has anyone else experienced similar ENOTFOUND errors from their Hugging Face Spaces when trying to connect to standard external APIs like Telegram? Are there any specific network settings or diagnostic steps I can perform within the Space itself, or any known limitations that might cause this?
Any insights or suggestions would be greatly appreciated!
No connection. HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f75e0a37eb0>: Failed to resolve 'api.telegram.org' ([Errno -5] No address associated with hostname)"))
No connection. HTTPConnectionPool(host='api.telegram.org', port=80): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f75e09df7c0>: Failed to resolve 'api.telegram.org' ([Errno -5] No address associated with hostname)"))
BTW, to OpanAI with HTTP case:
/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.openai.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
Connected to https://api.openai.com, but the server returned an error. Status code: 421
Yeah. I’m not sure if this is a problem or normal regulation, but it can only be resolved on the Hugging Face side. The DNS server referenced from Hugging Face Spaces cannot resolve the name for that site. Alternatively, you may need to consider using a proxy.
I’m not sure where is the appropriate place to raise issues related to server network settings like this. General support: website@huggingface.co
Omg I thought I was alone/going crazy. This even led me to creating a new HF account today.
Can someone confirm this is only happening to those on free spaces?