title: Where does getaddrinfo go for name resolution?
body: <p>I have a Raspberry Pi.  </p>
  
  <p><code>ping abc.azurewebsites.net</code> returns the IP address without issue.</p>
  
  <p>However, <code>socket.getaddrinfo('abc.azurewebsites.net',80)</code> 
  gives:</p>
  
  <blockquote>
    <p>socket.gaierror: [Errno -5] No address associated with hostname.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/UflzU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UflzU.png" alt="enter image description here"></a></p>
  
  <p>To make sure that the error is clear and isolated, I tried the above two commands on another Pi in another network and that one works fine.</p>
  
  <p>How can I resolve this problem?</p>