Bug 1589560 - ipa-replica-install fail when --setup-ca is used
Summary: ipa-replica-install fail when --setup-ca is used
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: IPA Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-10 19:33 UTC by Carlos Mogas da Silva
Modified: 2020-03-31 09:32 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-07-16 17:25:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
replica-install.log (5.93 KB, text/plain)
2018-06-10 19:33 UTC, Carlos Mogas da Silva
no flags Details
server-side.log (3.24 KB, text/plain)
2018-06-10 19:35 UTC, Carlos Mogas da Silva
no flags Details

Description Carlos Mogas da Silva 2018-06-10 19:33:12 UTC
Created attachment 1449768 [details]
replica-install.log

Description of problem:
Trying to setup a new replica against a CentOS 7.5 server (FreeIPA 4.5.4). A "normal" replica installs just fine, but if if try to make it a CA replica too (either by ipa-ca-install or ipa-replica-install --setup-ca), it fails on the step:

Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes
  [4/26]: configuring certificate server instance


Version-Release number of selected component (if applicable):
existing master is running 4.5.4 on centos 7.5, new replica is running fedora 28 freeipa 4.6.90.pre2.

How reproducible:
I really don't know if this is too specific to my versions of the packages, so, just a "simple" recreate of the environment should do it.


Steps to Reproduce:
1. ipa-replica-install --setup-ca (or ipa-ca-install after a successfully ipa-replica-install)

Actual results:
  [4/26]: configuring certificate server instance
ipaserver.install.dogtaginstance: CRITICAL Failed to configure CA instance: CalledProcessError(Command ['/usr/sbin/pkispawn', '-s', 'CA', '-f', '/tmp/tmpimcgo2by'] returned non-zero exit status 1: '')
ipaserver.install.dogtaginstance: CRITICAL See the installation logs and the following files/directories for more information:
ipaserver.install.dogtaginstance: CRITICAL   /var/log/pki/pki-tomcat
  [error] RuntimeError: CA configuration failed.


Expected results:
Sucessfull install

Additional info:

Comment 1 Carlos Mogas da Silva 2018-06-10 19:35:40 UTC
Created attachment 1449769 [details]
server-side.log

log of the server side (existing master freeipa server) when the errors occurs while setting up the ca replica.

Comment 2 Florence Blanc-Renaud 2018-06-14 11:23:16 UTC
Hi,
the log:
INFO: PKIAuthenticator: Authenticating with BASIC authentication
Invalid Credential.

points to wrong credentials. Did you specify the admin password when running ipa-replica-install (with -w ADMIN_PASSWORD)? What was your exact procedure (ipa-client-install, kinit admin, ipa-replica-install --setup-ca or in a single step ipa-replica-install)?

Comment 3 Carlos Mogas da Silva 2018-06-14 11:27:43 UTC
Hi Florence.

Yeah, I saw the invalid credential part, but I tried this several times :)

I didn't use "-w", it was just a simple ipa-replica-install --setup-ca --setup-dns. I also tried with just "ipa-ca-install" after a successfull ipa-replica-install, and it gives the same error.
I did the ipa-client-install, (didn't kinit admin, because it asks for the admin password), and then ipa-replica-install --setup-ca.

Also, just to complement the information, I just tried to setup a CentOS replica against the same server adn it worked.

Comment 4 Florence Blanc-Renaud 2018-06-19 09:05:23 UTC
Hi,

I am definitely unable to reproduce this behavior. Can you provide the full /var/log/pki/pki-ca-spawn.$DATE.log (from the replica) and /var/log/dirsrv/slapd-DOMAIN-COM/access (from the master)?
On a running topology, I remember the installer creates a temp entry with DN: uid=admin-replica.domain.com,ou=people,o=ipaca and a random password and pkispawn  performs the bind with this id. Let's see in the logs if the entry is created and if a BIND is attempted around the time you see the log "GET /ca/rest/securityDomain/domainInfo" in /var/log/pki/pki-tomcat/localhost_access_log.$DATE.txt


You can also try to run 
ipa-client-install
kinit admin
ipa-replica-install --setup-ca
and see if the behavior is different.

Note that you will probably need to run ipa-server-install --uninstall -U on the failing replica + ipa-replica-manage del <replica> on the master before being able to re-install the replica.

Comment 5 Rob Crittenden 2018-07-16 17:25:15 UTC
Closing due to insufficient information.

Comment 6 Carlos Mogas da Silva 2020-03-31 09:32:20 UTC
I can't reproduce this now (sorry the mail spam)


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