On Tue, Mar 21, 2017 at 03:42:14PM +0000, Brennan, Paul J wrote:
> Hi all,
>    Some time ago, I encountered issues requiring my first IPA master to be 
> re-initialized, which failed, forcing me to remove it from the domain. While 
> those original issues have since been resolved, I am having difficulty 
> replacing the system. I can create a new replica, but I cannot use the 
> '--setup-ca' option, nor can I run 'ipa-ca-install'. I have been working on 
> this for quite some time, and seem to be going in circles. Any help would be 
> greatly appreciated.
> 
> (host and domain names have been modified)
> ipasrv001 was the original master, installed using an external CA, no DNS and 
> no NTP. DNS and NTP are already provided in my environment.
> ipasrv201 is a replica installed with --setup-ca, which has since been 
> re-configured as the new CA master following this guide:
> https://www.freeipa.org/page/Howto/Promote_CA_to_Renewal_and_CRL_Master#Procedure_in_FreeIPA_.3C_4.0
> I have also pointed cs-replication to this system from all other replicas. I 
> used ipasrv201 to generate new replica-info for ipasrv001.
> 
> These systems are Enterprise Linux 6.8. Current software versions are as 
> follows:
> ----------------------------------------------------------------------------------------------------
> [root@ipasrv001 ~]# rpm -qa --queryformat='%{NAME} %{VERSION}-%{RELEASE}\n' 
> ipa-server pki-ca 389-ds-base java-1.7.0-openjdk certmonger
> certmonger 0.77.5-2.el6
> pki-ca 9.0.3-50.el6_8
> 389-ds-base 1.2.11.15-75.el6_8
> java-1.7.0-openjdk 1.7.0.111-2.6.7.2.0.1.el6_8
> ipa-server 3.0.0-50.el6_8.3
> ----------------------------------------------------------------------------------------------------
> 
> I receive the following error when attempting to create a new replica:
> ----------------------------------------------------------------------------------------------------
> [root@ipasrv001 ~]# ipa-replica-install --no-ntp --setup-ca --skip-conncheck 
> replica-info-ipasrv001.example.com.gpg
> Directory Manager (existing master) password:
> 
> Configuring directory server for the CA (pkids): Estimated time 30 seconds
>   [1/3]: creating directory server user
>   [2/3]: creating directory server instance
>   [3/3]: restarting directory server
> Done configuring directory server for the CA (pkids).
> Configuring certificate server (pki-cad): Estimated time 3 minutes 30 seconds
>   [1/17]: creating certificate server user
>   [2/17]: creating pki-ca instance
>   [3/17]: configuring certificate server instance
> ipa         : CRITICAL failed to configure ca instance Command '/usr/bin/perl 
> /usr/bin/pkisilent ConfigureCA -cs_hostname ipasrv001.example.com -cs_port 
> 9445 -client_certdb_dir /tmp/tmp-BDfli8 -client_certdb_pwd XXXXXXXX 
> -preop_pin SoawlFdqmJKt79OSoy1O -domain_name IPA -admin_user admin 
> -admin_email root@localhost -admin_password XXXXXXXX -agent_name ipa-ca-agent 
> -agent_key_size 2048 -agent_key_type rsa -agent_cert_subject 
> CN=ipa-ca-agent,O=EXAMPLE.COM,OU=IPA -ldap_host ipasrv001.example.com 
> -ldap_port 7389 -bind_dn cn=Directory Manager -bind_password XXXXXXXX 
> -base_dn o=ipaca -db_name ipaca -key_size 2048 -key_type rsa -key_algorithm 
> SHA256withRSA -save_p12 true -backup_pwd XXXXXXXX -subsystem_name pki-cad 
> -token_name internal -ca_subsystem_cert_subject_name CN=CA 
> Subsystem,O=EXAMPLE.COM,OU=IPA -ca_subsystem_cert_subject_name CN=CA 
> Subsystem,O=EXAMPLE.COM,OU=IPA -ca_ocsp_cert_subject_name CN=OCSP 
> Subsystem,O=EXAMPLE.COM,OU=IPA -ca_server_cert_subject_name 
> CN=ipasrv001.example.com,O=EXAMPLE.COM,OU=IPA 
> -ca_audit_signing_cert_subject_name CN=CA Audit,O=EXAMPLE.COM,OU=IPA 
> -ca_sign_cert_subject_name CN=Certificate Authority,O=EXAMPLE.COM,OU=IPA 
> -external false -clone true -clone_p12_file ca.p12 -clone_p12_password 
> XXXXXXXX -sd_hostname ipasrv201.example.com -sd_admin_port 443 -sd_admin_name 
> admin -sd_admin_password XXXXXXXX -clone_start_tls true -clone_uri 
> https://ipasrv201.example.com:443' returned non-zero exit status 255
> 
> Your system may be partly configured.
> Run /usr/sbin/ipa-server-install --uninstall to clean up.
> 
> Configuration of CA failed
> ----------------------------------------------------------------------------------------------------
> 
> In /var/log/ipareplica-install.log, I see the following:
> ----------------------------------------------------------------------------------------------------
> #############################################
> Attempting to connect to: ipasrv001.example.com:9445
> Connected.
> Posting Query = 
> https://ipasrv001.example.com:9445//ca/admin/console/config/wizard?p=5&subsystem=CA&session_id=-1815206698136119192&xml=true
> RESPONSE STATUS:  HTTP/1.1 200 OK
> RESPONSE HEADER:  Server: Apache-Coyote/1.1
> RESPONSE HEADER:  Content-Type: text/html;charset=UTF-8
> RESPONSE HEADER:  Date: Fri, 17 Mar 2017 15:50:34 GMT
> RESPONSE HEADER:  Connection: close
> Exception in SecurityDomainLoginPanel(): java.lang.Exception: Invalid 
> clone_uri
> ERROR: ConfigureSubCA: SecurityDomainLoginPanel() failure
> ERROR: unable to create CA
> 
> #######################################################################
> 
> 2017-03-17T15:50:35Z DEBUG stderr=java.lang.Exception: Invalid clone_uri
>         at ConfigureCA.SecurityDomainLoginPanel(ConfigureCA.java:392)
>         at ConfigureCA.ConfigureCAInstance(ConfigureCA.java:1179)
>         at ConfigureCA.main(ConfigureCA.java:1663)
> ----------------------------------------------------------------------------------------------------
> 
> In /var/log/pki-ca/debug, I see:
> ----------------------------------------------------------------------------------------------------
> Could not get or build CA chain. Error 
> java.security.cert.CertificateException: Certificate is not a PKCS #11 
> certificate
>         at 
> com.netscape.ca.CertificateAuthority.initSigUnit(CertificateAuthority.java:1285)
>         at 
> com.netscape.ca.CertificateAuthority.init(CertificateAuthority.java:262)
> ----------------------------------------------------------------------------------------------------
> 
> In /var/log/pki-ca/catalina.out I see:
> ----------------------------------------------------------------------------------------------------
> CMS Warning: FAILURE: Cannot build CA chain. Error 
> java.security.cert.CertificateException: Certificate is not a PKCS #11 
> certificate|FAILURE: authz instance DirAclAuthz initialization failed and 
> skipped, error=Property internaldb.ldapconn.port missing value|
> ----------------------------------------------------------------------------------------------------
> 
> I have tried deploying a new replica to freshly installed systems, and the 
> same problem occurs. I have backups from when IPA was first installed, if any 
> config files or certificates need to be brought back. I can provide further 
> log excerpts if needed.
> 
> Thank you in advance,
> Paul Brennan
> 

> -- 
> Manage your subscription for the Freeipa-users mailing list:
> https://www.redhat.com/mailman/listinfo/freeipa-users
> Go to http://freeipa.org for more info on the project

Hello Paul,
is there a reason you run ipa-replica-install with --skip-conncheck option?
Does it fail with the same error when you run with connection check?
There might be some closed ports on ipasrv201's firewall that cause this fail
and connection check would discover this. But it's just my wild guess.

-- 
David Kupka

Attachment: signature.asc
Description: PGP signature

-- 
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project

Reply via email to