Layer7 API Management

 View Only
Expand all | Collapse all

Unable to obtain HTTP response from http://www.google.com: Unknown host:www.google.com

  • 1.  Unable to obtain HTTP response from http://www.google.com: Unknown host:www.google.com

    Posted Aug 26, 2015 09:28 AM

    Why am i getting the above error,

     

    i just configured the policy manager for routing to http://www.google.com



  • 2.  Re: Unable to obtain HTTP response from http://www.google.com: Unknown host:www.google.com
    Best Answer

    Posted Aug 26, 2015 11:36 AM

    Hi Sathish2306,

     

    An "Unknown Host" error occurs when the API Gateway (or any computer, really) cannot resolve the domain. So in this case, your API Gateway is not resolving google.com and does not know where to send the request since it cannot locate an IP address for google.com. You will want to check your DNS settings on the API Gateway to make sure that the DNS IP addresses are correct, that it can reach the DNS servers, and that the DNS servers being used by the API Gateway can resolve google.com to a valid IP address.

     

    Some troubleshooting steps for you:

    • Run this command in a privileged shell on the node: # nslookup google.com
      • The output should show Name and Address, where Address is the IP address for google.com. Note: it may list many entries depending on how the DNS server is configured.
      • If you don't get an IP address, then that will confirm that the API Gateway cannot resolve google.com because DNS isn't working (or possibly a network issue between it and the DNS servers it's configured to use).
    • Run this command in a privileged shell on the node: # ping google.com
      • The output should show something similar to "PING google.com (<IP Address>) ##(##) bytes of data" and then proceeded by the results of each ping every couple of seconds.
      • If the output shows a failure to ping (not reaching its destination), then there is something wrong with either DNS or the network between the API Gateway and google.com.
      • If it at least shows an IP address for google.com then we know it can resolve it and should be working, so then it becomes more of a network issue than a DNS issue.
      • Based on the error noted in this thread, I'm expecting the output to be "ping: unknown host google.com". In which case, it's a DNS issue.
    • Make sure the API Gateway can reach the DNS servers it is configured to use. So if your DNS server is 8.8.8.8, for example, then make sure the API Gateway can ping that same IP address. If it cannot ping it, it is likely a networking issue between the API Gateway and the DNS server (or the DNS server is just set to not respond to a ping which is possible but unlikely).
    • Make sure the DNS server its configured for is able to resolve google.com. You will need to follow up with your DNS server administrator to determine the best troubleshooting method for the DNS server.

     

    If you haven't actually set up DNS yet on the API Gateway, then please follow the instructions found at https://wiki.ca.com/display/GATEWAY84/Option+1+-+Configure+Networking+and+System+Time+Settings or otherwise manually edit the /etc/resolv.conf file to add the name (DNS) servers that are needed.

     

    I hope that helps point you in the right direction. Please let me know if you need any further assistance.

     

    Sincerely,

     

    Dustin Dauncey

    Support Engineer, Global Customer Success

    Email: API-Support@ca.com

    Phone: +1 800 225 5224

    Outside of North America - ca.com/us/worldwide.aspx

    CA API Management Community: ca.com/talkapi