52777

getaddrinfo returns always 11001 (host not found)

Although the searched FQDN appears in etc\hosts file.

Any idea? Thanks a lot!

Answer1:

Since I don't have code, here's a guess:

getaddrinfo("http://www.example.com");

Doesn't work; getaddrinfo takes a hostname not a URL.

Answer2:

Take a look at this hostname not translated into an IP address using Winsock

getaddrinfo may be giving you an IPv6 address, or perhaps the machine has more than one IP address and you're trying to connect to the wrong one.

Recommend

  • Get FQDN in C# running on Mono
  • container class for gnu.mail.providers.nntp.NNTPMessage
  • WARNING: Failed to connect to ip-xxx-xx-xx-xx
  • Ruby on Rails: Cant download new gems (Name or service not known)
  • python -m pip install -U pip Errno 11004
  • How should I implement Rest API in KAA
  • Get all DNS records associated with an IP
  • What is “PHP-standardized” version number strings?
  • Generating random numbers directly inside a .htaccess file
  • How to get Fully qualified domain name in unix
  • How to create virtual printer with iOS Simulator?
  • Regex for Specific Tag
  • How can we prepend rows to a react native list-view?
  • netsh acl setting (need alternative method - registry settings?)
  • how to set variables in a php include file?
  • How to autopopulate a field in SugarCRM form
  • Do I need to seed any random number generator before using EVP_PKEY_keygen of OpenSSL?
  • Differences in dis-assembled C code of GCC and Borland?
  • What's the purpose of QString?
  • Jackson Parser: ignore deserializing for type mismatch
  • Recording logins for password protected directories
  • Get one-time binding to work for ng-if
  • Is there any way to access browser form field suggestions from JavaScript?
  • Read text file and split every line in MSBuild
  • Optimizing database types to compact database (SQLite)
  • C# - Serializing and deserializing static member
  • Java applet as stand-alone Windows application?
  • Cross-Platform Protobuf Serialization
  • Do I've to free mysql result after storing it?
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • Error creating VM instance in Google Compute Engine
  • Acquiring multiple attributes from .xml file in c#
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Exception on Android 4.0 `android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode)`
  • Turn off referential integrity in Derby? is it possible?
  • How can I remove ASP.NET Designer.cs files?
  • JaxB to read class hierarchy
  • java string with new operator and a literal