RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1142088 - ipa-server-install searches CA under different hostname
Summary: ipa-server-install searches CA under different hostname
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: David Kupka
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-16 07:15 UTC by David Spurek
Modified: 2015-03-05 10:13 UTC (History)
4 users (show)

Fixed In Version: ipa-4.1.0-0.1.alpha1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:13:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ipaserver-install.log (3.58 MB, application/octet-stream)
2014-09-16 07:26 UTC, David Spurek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0442 0 normal SHIPPED_LIVE Moderate: ipa security, bug fix, and enhancement update 2015-03-05 14:50:39 UTC

Description David Spurek 2014-09-16 07:15:06 UTC
Description of problem:
ipa-server-install searches CA under different hostname

[root@sec-ipa2 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:00:01:c4 brd ff:ff:ff:ff:ff:ff
    inet 10.34.37.25/23 brd 10.34.37.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2620:52:0:2223::1:4/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe00:1c4/64 scope link 
       valid_lft forever preferred_lft forever
[root@sec-ipa2 ~]# ipa-server-install -a Pass2012! -p Pass2012! --domain=ipa2.baseos.qe --realm=IPA2.BASEOS.QE --hostname sec-ipa2.ipa2.baseos.qe --setup-dns

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Existing BIND configuration detected, overwrite? [no]: yes
Warning: skipping DNS resolution of host sec-ipa2.ipa2.baseos.qe

Warning: hostname sec-ipa2.ipa2.baseos.qe does not match system hostname sec-ipa2.ipa.baseos.qe.
System hostname will be updated during the installation process
to prevent service failures.

Unable to resolve IP address for host name
Please provide the IP address to be used for this host name: 10.34.37.25
Adding [10.34.37.25 sec-ipa2.ipa2.baseos.qe] to your /etc/hosts file
Do you want to configure DNS forwarders? [yes]: yes
Enter the IP address of DNS forwarder to use, or press Enter to finish.
Enter IP address for a DNS forwarder: 
No DNS forwarders configured
Do you want to configure the reverse zone? [yes]: no

The IPA Master Server will be configured with:
Hostname:      sec-ipa2.ipa2.baseos.qe
IP address:    10.34.37.25
Domain name:   ipa2.baseos.qe
Realm name:    IPA2.BASEOS.QE

BIND DNS server will be configured to serve IPA domain with:
Forwarders:    No forwarders
Reverse zone:  No reverse zone

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv): Estimated time 1 minute
  [1/38]: creating directory server user
  [2/38]: creating directory server instance
  [3/38]: adding default schema
  [4/38]: enabling memberof plugin
  [5/38]: enabling winsync plugin
  [6/38]: configuring replication version plugin
  [7/38]: enabling IPA enrollment plugin
  [8/38]: enabling ldapi
  [9/38]: configuring uniqueness plugin
  [10/38]: configuring uuid plugin
  [11/38]: configuring modrdn plugin
  [12/38]: configuring DNS plugin
  [13/38]: enabling entryUSN plugin
  [14/38]: configuring lockout plugin
  [15/38]: creating indices
  [16/38]: enabling referential integrity plugin
  [17/38]: configuring certmap.conf
  [18/38]: configure autobind for root
  [19/38]: configure new location for managed entries
  [20/38]: configure dirsrv ccache
  [21/38]: enable SASL mapping fallback
  [22/38]: restarting directory server
  [23/38]: adding default layout
  [24/38]: adding delegation layout
  [25/38]: creating container for managed entries
  [26/38]: configuring user private groups
  [27/38]: configuring netgroups from hostgroups
  [28/38]: creating default Sudo bind user
  [29/38]: creating default Auto Member layout
  [30/38]: adding range check plugin
  [31/38]: creating default HBAC rule allow_all
  [32/38]: initializing group membership
  [33/38]: adding master entry
  [34/38]: configuring Posix uid/gid generation
  [35/38]: adding replication acis
  [36/38]: enabling compatibility plugin
  [37/38]: tuning directory server
  [38/38]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring certificate server (pki-tomcatd): Estimated time 3 minutes 30 seconds
  [1/22]: creating certificate server user
  [2/22]: configuring certificate server instance
  [3/22]: stopping certificate server instance to update CS.cfg
  [4/22]: disabling nonces
  [5/22]: set up CRL publishing
  [6/22]: starting certificate server instance
CA did not start in 300s

Version-Release number of selected component (if applicable):
ipa-server-3.3.3-28.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Spurek 2014-09-16 07:26:52 UTC
Created attachment 937870 [details]
ipaserver-install.log

Comment 2 Martin Kosek 2014-09-16 08:13:07 UTC
I did the initial investigation, it looks like ipa-server-install is querying the original hostname before it was changed:

2014-09-16T06:11:26Z DEBUG /usr/sbin/ipa-server-install was invoked with options: {...'host_name': 'sec-ipa2.ipa2.baseos.qe'...}
...
2014-09-16T06:14:17Z DEBUG Chosen hostname (sec-ipa2.ipa2.baseos.qe) differs from system hostname (sec-ipa2.ipa.baseos.qe) - change it
...
2014-09-16T06:16:52Z DEBUG stderr=
2014-09-16T06:16:52Z DEBUG wait_for_open_ports: localhost [8080, 8443] timeout 300
2014-09-16T06:16:56Z DEBUG The httpd proxy is not installed, wait on local port
2014-09-16T06:16:56Z DEBUG Waiting until the CA is running
2014-09-16T06:16:56Z DEBUG request 'https://sec-ipa2.ipa.baseos.qe:8443/ca/admin/ca/getStatus'
2014-09-16T06:16:56Z DEBUG request body ''
2014-09-16T06:16:56Z DEBUG The CA status is: check interrupted
2014-09-16T06:16:56Z DEBUG Waiting for CA to start...
2014-09-16T06:16:57Z DEBUG request 'https://sec-ipa2.ipa.baseos.qe:8443/ca/admin/ca/getStatus'
2014-09-16T06:16:57Z DEBUG request body ''
2014-09-16T06:16:57Z DEBUG The CA status is: check interrupted
2014-09-16T06:16:57Z DEBUG Waiting for CA to start...
...

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.x.x.x	sec-ipa2.ipa2.baseos.qe sec-ipa2


The CA is running properly on the right hostname:

# wget --no-check-certificate https://sec-ipa2.ipa2.baseos.qe:8443/ca/admin/ca/getStatus 
...
HTTP request sent, awaiting response... 200 OK
Length: 167 [application/xml]
Saving to: ‘getStatus’

100%[===============================================================>] 167         --.-K/s   in 0s      

2014-09-16 03:04:31 (30.8 MB/s) - ‘getStatus’ saved [167/167]

# cat getStatus 
<?xml version="1.0" encoding="UTF-8" standalone="no"?><XMLResponse><State>1</State><Type>CA</Type><Status>running</Status><Version>10.0.5-3.el7</Version></XMLResponse>[root@sec-ipa2 ~]# 


Maybe api.env.ca_host that is used when querying CA is pointing to old hostname?

Comment 3 Martin Kosek 2014-09-16 08:15:08 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4541

Comment 4 Martin Kosek 2014-09-19 07:48:59 UTC
This problem should be fixed as part of FreeIPA 4.x rebase (Bug 1109726).

To reproduce, just run ipa-server-install with --hostname $HOSTNAME where $HOSTNAME is different from system hostname. David Kupka can provide more info if needed.

Comment 6 Kaleem 2015-01-06 10:31:52 UTC
Verified.

IPA version:
============
[root@dhcp207-214 ~]# rpm -q ipa-server
ipa-server-4.1.0-12.el7.x86_64
[root@dhcp207-214 ~]# 

[root@dhcp207-214 ~]# hostname
dhcp207-214.testrelm.test
[root@dhcp207-214 ~]# echo $HOSTNAME
dhcp207-214-new.testrelm.test
[root@dhcp207-214 ~]# /usr/sbin/ipa-server-install --setup-dns --forwarder=10.65.201.89 --hostname=$HOSTNAME -r TESTRELM.TEST -n testrelm.test -p xxxxxxxx -a xxxxxxxx --ip-address=10.65.207.214 -U

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

The host name dhcp207-214-new.testrelm.test does not match the primary host name dhcp207-214.testrelm.test. Please check /etc/hosts or DNS name resolution

[root@dhcp207-214 ~]#

Comment 9 errata-xmlrpc 2015-03-05 10:13:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0442.html


Note You need to log in before you can comment on or make changes to this bug.