I’m experiencing persistent DNS resolution errors when trying to access https://api-inference.huggingface.co from within my Space.
My space is running on Nvidia 1xL4 hardware and I am receiving this error no matter which text-generation model I use: requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘api-inference.huggingface.co’, port=443): Max retries exceeded with url: … (Caused by NameResolutionError: Failed to resolve ‘api-inference.huggingface.co’ ([Errno -2] Name or service not known))
I’ve verified that:
requests.get("https://www.google.com") works from the same Space
The domain resolves externally (confirmed via nslookup and curl on my local machine)
Changing hardware tiers does not resolve the issue
It appears to be a DNS or routing misconfiguration inside the Space environment. Is there anyway I can fix this or try to resolve this? If there is anymore information I can provide please let me know.
I get the same error when running a new version of a python shiny chatbot in my huggingface space but the same code can access the Mistral model on huggingface when it is running locally. The hf configuration worked previously but when I uploaded a new version today I get the “Failed to resolve ‘api-inference.huggingface.co’” Putting a check in the dockerfile shows it can ping and access the url but no joy when trying to run the code
I seem to be getting the same issue. I am only using the Basic Free hardware, but any model I run on the space gives that same exact error. Is this a problem on my end? Or is this happening to everyone?
what’s wrong with those hf models?? i have a review today and i am unable to get the results by using those base models how can i explain this to them right now
I tried sending multiple requests to several text-generation models but I am still getting the error “requests.exceptions.ConnectionError: (MaxRetryError('HTTPSConnectionPool(host='api-inference.huggingface.co', port=443): Max retries exceeded with url: … (Caused by NameResolutionError(”<urllib3.connection.HTTPSConnection object at …>: Failed to resolve 'api-inference.huggingface.co' ([Errno -2] Name or service not known)“))'), ‘(Request ID: …)’)” Is there any new information on how to resolve this or if a fix is coming soon? Thank you!