Hi! I imagine this has something to do with DNS, but really can't tell what's wrong: [root@7-3 ~]# hostname 7-3.example.com [root@7-3 ~]# ipa-client-install -N 7-3 is not a fully-qualified hostname The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information [root@7-3 ~]# cat /var/log/ipaclient-install.log 2019-01-04T19:27:32Z DEBUG Logging to /var/log/ipaclient-install.log 2019-01-04T19:27:32Z DEBUG ipa-client-install was invoked with arguments [] and options: {'no_dns_sshfp': False, 'force': False, 'verbose': False, 'ip_addresses': None, 'configure_firefox': False, 'realm_name': None, 'force_ntpd': False, 'on_master': False, 'no_nisdomain': False, 'ssh_trust_dns': False, 'principal': None, 'keytab': None, 'no_ntp': True, 'domain_name': None, 'request_cert': False, 'fixed_primary': False, 'no_ac': False, 'no_sudo': False, 'ca_cert_files': None, 'all_ip_addresses': False, 'kinit_attempts': None, 'ntp_servers': None, 'enable_dns_updates': False, 'no_sshd': False, 'no_sssd': False, 'no_krb5_offline_passwords': False, 'servers': None, 'no_ssh': False, 'force_join': False, 'firefox_dir': None, 'unattended': False, 'quiet': False, 'nisdomain': None, 'prompt_password': False, 'host_name': None, 'permit': False, 'automount_location': None, 'preserve_sssd': False, 'mkhomedir': False, 'log_file': None, 'uninstall': False} 2019-01-04T19:27:32Z DEBUG IPA version 4.6.4-10.el7 2019-01-04T19:27:32Z DEBUG Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index' 2019-01-04T19:27:32Z DEBUG Starting external process 2019-01-04T19:27:32Z DEBUG args=/usr/sbin/selinuxenabled 2019-01-04T19:27:32Z DEBUG Process finished, return code=0 2019-01-04T19:27:32Z DEBUG stdout= 2019-01-04T19:27:32Z DEBUG stderr= 2019-01-04T19:27:32Z DEBUG [IPA Discovery] 2019-01-04T19:27:32Z DEBUG Starting IPA discovery with domain=None, servers=None, hostname=7-3 2019-01-04T19:27:32Z DEBUG File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 178, in execute return_value = self.run() File "/usr/lib/python2.7/site-packages/ipapython/install/cli.py", line 319, in run return cfgr.run() File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 362, in run self.validate() File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 371, in validate for _nothing in self._validator(): File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 434, in __runner exc_handler(exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 458, in _handle_validate_exception self._handle_exception(exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 453, in _handle_exception six.reraise(*exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 424, in __runner step() File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 421, in <lambda> step = lambda: next(self.__gen) File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from six.reraise(*exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from value = gen.send(prev_value) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 636, in _configure next(validator) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 434, in __runner exc_handler(exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 458, in _handle_validate_exception self._handle_exception(exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 521, in _handle_exception self.__parent._handle_exception(exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 453, in _handle_exception six.reraise(*exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 518, in _handle_exception super(ComponentBase, self)._handle_exception(exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 453, in _handle_exception six.reraise(*exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 424, in __runner step() File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 421, in <lambda> step = lambda: next(self.__gen) File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from six.reraise(*exc_info) File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from value = gen.send(prev_value) File "/usr/lib/python2.7/site-packages/ipapython/install/common.py", line 65, in _install for unused in self._installer(self.parent): File "/usr/lib/python2.7/site-packages/ipaclient/install/client.py", line 3630, in main install_check(self) File "/usr/lib/python2.7/site-packages/ipaclient/install/client.py", line 2106, in install_check rval=CLIENT_INSTALL_ERROR) 2019-01-04T19:27:32Z DEBUG The ipa-client-install command failed, exception: ScriptError: 7-3 is not a fully-qualified hostname 2019-01-04T19:27:32Z ERROR 7-3 is not a fully-qualified hostname 2019-01-04T19:27:32Z ERROR The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information [root@7-3 ~]# rpm -qv ipa-client ipa-client-4.6.4-10.el7.x86_64 [root@7-3 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@7-3 ~]#
It seems it was related to DNS somehow. Adding `192.168.122.110 7-3.example.com 7-3` to /etc/hosts caused the installation to succeed. So at the very least that error message needs updated.
The python call socket.getfqdn() is returning only 7.3 as evidenced by the log message: 2019-01-04T19:27:32Z DEBUG Starting IPA discovery with domain=None, servers=None, hostname=7-3
https://tools.ietf.org/html/rfc1123#page-13 claims that a hostname starting with a digit is allowed so it might be a bug in our code.
Christian, could you please check if socket.getfqdn() or glibc has a restriction against RFC1123 section 2.1?
I'm unable to reproduce the issue on a RHEL 7.6 machine. I have created an IPA master with DNS and a client with hostname "7-6.ipa.test". The DNS server on master manages the "ipa.test." zone as well as the reverse zone for the client's IP address. The client uses the master's DNS server in /etc/resolv.conf. I haven't added any additional entries to /etc/hosts. socket.getfqdn() returns the correct hostname "7-6.ipa.test". ipa-client-install succeeds with the hostname, too.
Hi Robbie, could you check the config for hosts: in /etc/nsswitch.conf, /etc/hostname, the output of hostname, hostnamectl, and dig +short -x <IP addr>? The hostname is probably defined as a short name somewhere.