"getaddrinfo: No address associated with hostname" when connecting to loopback

Solution Verified - Updated -

Issue

  • Application returns error getaddrinfo: No address associated with hostname when connecting to localhost:
$ nc -6 localhost 12345
nc: getaddrinfo: No address associated with hostname
  • Getting local host error even when run with user account or root

Environment

  • Red Hat Enterprise Linux 6
  • Network connection to localhost

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content