IPA server installation fails with '[Errno -2] Name or service not known' error

Solution Unverified - Updated -

Issue

  • During ipa server installation '[Errno -2] Name or service not known' error occurred
[root@server]# ipa-server-install 
Traceback (most recent call last):
  File "/sbin/ipa-server-install", line 23, in <module>
    from ipaserver.install import ipa_server_install
  File "/usr/lib/python3.9/site-packages/ipaserver/install/ipa_server_install.py", line 10, in <module>
    from ipaserver.install.server import ServerMasterInstall
  File "/usr/lib/python3.9/site-packages/ipaserver/install/server/__init__.py", line 11, in <module>
    from ipaclient.install import client
  File "/usr/lib/python3.9/site-packages/ipaclient/install/client.py", line 37, in <module>
    from ipalib import api, errors, x509
  File "/usr/lib/python3.9/site-packages/ipalib/__init__.py", line 919, in <module>
    from ipalib import plugable
  File "/usr/lib/python3.9/site-packages/ipalib/plugable.py", line 43, in <module>
    from ipalib import errors
  File "/usr/lib/python3.9/site-packages/ipalib/errors.py", line 109, in <module>
    from ipalib.text import ngettext as ungettext
  File "/usr/lib/python3.9/site-packages/ipalib/text.py", line 139, in <module>
    from ipalib.request import context
  File "/usr/lib/python3.9/site-packages/ipalib/request.py", line 28, in <module>
    from ipalib.base import ReadOnly, lock
  File "/usr/lib/python3.9/site-packages/ipalib/base.py", line 26, in <module>
    from ipalib.constants import NAME_REGEX, NAME_ERROR
  File "/usr/lib/python3.9/site-packages/ipalib/constants.py", line 36, in <module>
    FQDN = gethostfqdn()
  File "/usr/lib/python3.9/site-packages/ipapython/fqdn.py", line 21, in gethostfqdn
    gai = socket.getaddrinfo(
  File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
[root@server]# 

Environment

  • Red Hat Enterprise Linux 9

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