ldapsearch command is failing with error "ldap_connect_to_host: getaddrinfo failed: Name or service not known"

Solution Verified - Updated -

Issue

  • ldapsearch command is failing with error.
ldap_connect_to_host: TCP ldaps://ldap.example.test:1636:389
ldap_connect_to_host: getaddrinfo failed: Name or service not known
ldap_err2string
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • openldap-clients

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