Error: getaddrinfo ENOTFOUND conversations.roaming.gll.twilio.com
Problem
Issue Summary I found that DNS cannot resolve the domain of the API. For Example: https://conversations.roaming.gll.twilio.com/v1/Users I modified the `getHostname` in `lib/rest/Twilio.js` and removed the edge / region to bypass the problem. Exception/Log [code block] Technical details: twilio-node version: 3.59.0 node version: v12.20.1
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix DNS Resolution for Twilio Conversations API
The error 'getaddrinfo ENOTFOUND conversations.roaming.gll.twilio.com' indicates that the DNS resolver is unable to find the IP address associated with the specified domain. This could be due to a temporary DNS issue, incorrect DNS settings, or the domain being deprecated or moved. The modification to bypass the region in the `getHostname` function is a temporary workaround but does not resolve the underlying DNS issue.
Awaiting Verification
Be the first to verify this fix
- 1
Check DNS Configuration
Verify that your DNS settings are correctly configured. Ensure that you are using a reliable DNS server such as Google DNS (8.8.8.8) or Cloudflare DNS (1.1.1.1).
bashcat /etc/resolv.conf - 2
Test DNS Resolution
Use the `nslookup` or `dig` command to check if the domain can be resolved. This will help confirm if the issue is with your local DNS resolver or the domain itself.
bashnslookup conversations.roaming.gll.twilio.com - 3
Update Node.js and Twilio SDK
Ensure you are using the latest version of Node.js and the Twilio SDK. This can resolve compatibility issues that may affect DNS resolution.
bashnpm install twilio@latest && nvm install node - 4
Modify Host File (if necessary)
If the domain is still not resolving, consider adding a temporary entry in your hosts file to bypass DNS resolution. This is not a permanent fix but can help in testing.
bashecho 'IP_ADDRESS conversations.roaming.gll.twilio.com' | sudo tee -a /etc/hosts - 5
Contact Twilio Support
If the issue persists after trying the above steps, reach out to Twilio support to confirm if there are any ongoing issues with the domain or if it has been deprecated.
Validation
Confirm the fix by running your application again and checking if the API call to https://conversations.roaming.gll.twilio.com/v1/Users succeeds without throwing a DNS resolution error.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep