<div dir="ltr"><div>I've tried that but still the same result.<br><br>[root@ipa-server /]# ldapsearch -D "cn=directory manager" -W -p 389 -h localhost -b "uid=admin,ou=people,o=ipaca"</div><div>Enter LDAP Password: </div><div># extended LDIF</div><div>#</div><div># LDAPv3</div><div># base <uid=admin,ou=people,o=ipaca> with scope subtree</div><div># filter: (objectclass=*)</div><div># requesting: ALL</div><div>#</div><div><br></div><div># search result</div><div>search: 2</div><div>result: 32 No such object</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 9, 2016 at 6:04 PM, Petr Vobornik <span dir="ltr"><<a href="mailto:pvoborni@redhat.com" target="_blank">pvoborni@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 09/09/2016 04:24 PM, Giorgos Kafataridis wrote:<br>
><br>
><br>
> On 09/09/2016 04:09 PM, Petr Vobornik wrote:<br>
>> On 09/09/2016 02:33 PM, Giorgos Kafataridis wrote:<br>
>>>>> Yes, I have followed<br>
>>>>> <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Linux_Domain_Identity_Authentication_and_Policy_Guide/upgrading.html" rel="noreferrer" target="_blank">https://access.redhat.com/<wbr>documentation/en-US/Red_Hat_<wbr>Enterprise_Linux/7/html/Linux_<wbr>Domain_Identity_<wbr>Authentication_and_Policy_<wbr>Guide/upgrading.html</a><br>
>>>>><br>
>>>>> to the letter.<br>
>>>>> The only reason I had to recreate the cacert.p12 file is because it<br>
>>>>> is not<br>
>>>>> renewed automatically in v3, so the cacert.p12 was outdated and the<br>
>>>>> CA was<br>
>>>>> throwing an "p12 invalid digest" error.<br>
>>>>><br>
>>>>>     * I opened all necessary ports<br>
>>>>>     * I checked all certs and they are valid for another year<br>
>>>>><br>
>>>>><br>
>>>>> /Run connection check to master//<br>
>>>>> //Check connection from replica to remote master 'ipa-server.nelios'://<br>
>>>>> //   Directory Service: Unsecure port (389): OK//<br>
>>>>> //   Directory Service: Secure port (636): OK//<br>
>>>>> //   Kerberos KDC: TCP (88): OK//<br>
>>>>> //   Kerberos Kpasswd: TCP (464): OK//<br>
>>>>> //   HTTP Server: Unsecure port (80): OK//<br>
>>>>> //   HTTP Server: Secure port (443): OK//<br>
>>>>> //   PKI-CA: Directory Service port (7389): OK//<br>
>>>>> //<br>
>>>>> //The following list of ports use UDP protocol and would need to be//<br>
>>>>> //checked manually://<br>
>>>>> //   Kerberos KDC: UDP (88): SKIPPED//<br>
>>>>> //   Kerberos Kpasswd: UDP (464): SKIPPED//<br>
>>>>> //<br>
>>>>> //Connection from replica to master is OK.//<br>
>>>>> //Start listening on required ports for remote master check//<br>
>>>>> //Get credentials to log in to remote master//<br>
>>>>> //Check SSH connection to remote master//<br>
>>>>> //Execute check on remote master//<br>
>>>>> //Check connection from master to remote replica<br>
>>>>> 'ipa2-server2.nelios'://<br>
>>>>> //   Directory Service: Unsecure port (389): OK//<br>
>>>>> //   Directory Service: Secure port (636): OK//<br>
>>>>> //   Kerberos KDC: TCP (88): OK//<br>
>>>>> //   Kerberos KDC: UDP (88): OK//<br>
>>>>> //   Kerberos Kpasswd: TCP (464): OK//<br>
>>>>> //   Kerberos Kpasswd: UDP (464): OK//<br>
>>>>> //   HTTP Server: Unsecure port (80): OK//<br>
>>>>> //   HTTP Server: Secure port (443): OK//<br>
>>>>> //<br>
>>>>> //Connection from master to replica is OK.//<br>
>>>>> //<br>
>>>>> //Connection check OK/<br>
>>>>><br>
>>>>> *Even with a fresh install of centos 7 with different hostname and ip<br>
>>>>> and I<br>
>>>>> still get the  the error below*<br>
>>>>><br>
>>>>> Configuring certificate server (pki-tomcatd). Estimated time: 3<br>
>>>>> minutes 30 seconds<br>
>>>>>      [1/24]: creating certificate server user<br>
>>>>>      [2/24]: configuring certificate server instance<br>
>>>>> ipa.ipaserver.install.<wbr>cainstance.CAInstance: CRITICAL Failed to<br>
>>>>> configure CA<br>
>>>>> instance: Command ''/usr/sbin/pkispawn' '-s' 'CA' '-f' '/tmp/tmpbMwmp_''<br>
>>>>> returned non-zero exit status 1<br>
>>>>> ipa.ipaserver.install.<wbr>cainstance.CAInstance: CRITICAL See the<br>
>>>>> installation logs<br>
>>>>> and the following files/directories for more information:<br>
>>>>> ipa.ipaserver.install.<wbr>cainstance.CAInstance: CRITICAL<br>
>>>>> /var/log/pki-ca-install.log<br>
>>>>> ipa.ipaserver.install.<wbr>cainstance.CAInstance: CRITICAL<br>
>>>>> /var/log/pki/pki-tomcat<br>
>>>>>      [error] RuntimeError: CA configuration failed.<br>
>>>>> Your system may be partly configured.<br>
>>>>> Run /usr/sbin/ipa-server-install --uninstall to clean up.<br>
>>>>><br>
>>>>> ipa.ipapython.install.cli.<wbr>install_tool(Replica): ERROR    CA<br>
>>>>> configuration failed.<br>
>>>>><br>
>>>>> *<br>
>>>>> **With debug enabled I get: *<br>
>>>>><br>
>>>>> pa         : DEBUG    Starting external process<br>
>>>>> ipa         : DEBUG    args='/usr/sbin/pkispawn' '-s' 'CA' '-f'<br>
>>>>> '/tmp/tmpwY8XjR'<br>
>>>>> ipa         : DEBUG    Process finished, return code=1<br>
>>>>> ipa         : DEBUG    stdout=Log file:<br>
>>>>> /var/log/pki/pki-ca-spawn.<wbr>20160909044214.log<br>
>>>>> Loading deployment configuration from /tmp/tmpwY8XjR.<br>
>>>>> Installing CA into /var/lib/pki/pki-tomcat.<br>
>>>>> Storing deployment configuration into<br>
>>>>> /etc/sysconfig/pki/tomcat/pki-<wbr>tomcat/ca/deployment.cfg.<br>
>>>>><br>
>>>>> Installation failed.<br>
>>>>><br>
>>>>><br>
>>>>> ipa         : DEBUG<br>
>>>>> stderr=/usr/lib/python2.7/<wbr>site-packages/urllib3/<wbr>connectionpool.py:769:<br>
>>>>> InsecureRequestWarning: Unverified HTTPS request is being made. Adding<br>
>>>>> certificate verification is strongly advised. See:<br>
>>>>> <a href="https://urllib3.readthedocs.org/en/latest/security.html" rel="noreferrer" target="_blank">https://urllib3.readthedocs.<wbr>org/en/latest/security.html</a><br>
>>>>>      InsecureRequestWarning)<br>
>>>>> pkispawn    : WARNING  ....... unable to validate security domain<br>
>>>>> user/password<br>
>>>>> through REST interface. Interface not available<br>
>>>>> pkispawn    : ERROR    ....... Exception from Java Configuration<br>
>>>>> Servlet: 500<br>
>>>>> Server Error: Internal Server Error<br>
>>>>> pkispawn    : ERROR    ....... ParseError: not well-formed (invalid<br>
>>>>> token): line<br>
>>>>> 1, column 0:<br>
>>>>> {"Attributes":{"Attribute":[]}<wbr>,"ClassName":"com.netscape.<wbr>certsrv.base.PKIException","<wbr>Code":500,"Message":"Failed<br>
>>>>><br>
>>>>> to obtain installation token from security domain"}<br>
>>>>><br>
>>>>><br>
>>>>> Is there a way to validate the repilca .gpg file from a v3<br>
>>>>> installation against<br>
>>>>> a v4.2 freeipa installation to check for any errors before going<br>
>>>>> through the<br>
>>>>> ipa-replica-install?<br>
>>>>> The ipa-replica-install completes if I don't include the --setup-ca<br>
>>>>> flag but I<br>
>>>>> don't want that<br>
>>>>><br>
>>>> There is no automatic method to verify the replica file.<br>
>>>><br>
>>>> Could you share the stack trace from /var/log/pki/pki-tomcat/ca/<wbr>debug  +<br>
>>>> couple lines before and after?<br>
>>>><br>
>>>><br>
>>> Contents  of /var/log/pki/pki-tomcat/ca/<wbr>debug:<br>
>>><br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: MessageFormatInterceptor:<br>
>>> SystemConfigResource.<wbr>configure()<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: MessageFormatInterceptor:<br>
>>> content-type: application/json<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: MessageFormatInterceptor:<br>
>>> accept: [application/json]<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: MessageFormatInterceptor:<br>
>>> request format: application/json<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: MessageFormatInterceptor:<br>
>>> response format: application/json<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: SystemConfigService:<br>
>>> configure()<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: SystemConfigService:<br>
>>> request: ConfigurationRequest [pin=XXXX, token=Internal Key Storage<br>
>>> Token, tokenPassword=XXXX, securityDomainType=<wbr>existingdomain,<br>
>>> securityDomainUri=<a href="https://ipa-server.nelios:443" rel="noreferrer" target="_blank">https://ipa-<wbr>server.nelios:443</a>,<br>
>>> securityDomainName=null, securityDomainUser=admin,<br>
>>> securityDomainPassword=XXXX, isClone=true,<br>
>>> cloneUri=<a href="https://ipa-server.nelios:443" rel="noreferrer" target="_blank">https://ipa-server.<wbr>nelios:443</a>, subsystemName=CA<br>
>>> ipa2-server2.nelios 8443, p12File=/tmp/ca.p12, p12Password=XXXX,<br>
>>> hierarchy=root, dsHost=ipa2-server2.nelios, dsPort=389, baseDN=o=ipaca,<br>
>>> bindDN=cn=Directory Manager, bindpwd=XXXX, database=ipaca,<br>
>>> secureConn=false, removeData=true, replicateSchema=false,<br>
>>> masterReplicationPort=7389, cloneReplicationPort=389,<br>
>>> replicationSecurity=TLS,<br>
>>> systemCerts=[com.netscape.<wbr>certsrv.system.SystemCertData@<wbr>434a841],<br>
>>> issuingCA=<a href="https://ipa-server.nelios:443" rel="noreferrer" target="_blank">https://ipa-server.<wbr>nelios:443</a>, backupKeys=true,<br>
>>> backupPassword=XXXX,<br>
>>> backupFile=/etc/pki/pki-<wbr>tomcat/alias/ca_backup_keys.<wbr>p12, adminUID=null,<br>
>>> adminPassword=XXXX, adminEmail=null, adminCertRequest=null,<br>
>>> adminCertRequestType=null, adminSubjectDN=null, adminName=null,<br>
>>> adminProfileID=null, adminCert=null, importAdminCert=false,<br>
>>> generateServerCert=true, external=false, standAlone=false,<br>
>>> stepTwo=false, authdbBaseDN=null, authdbHost=null, authdbPort=null,<br>
>>> authdbSecureConn=null, caUri=null, kraUri=null, tksUri=null,<br>
>>> enableServerSideKeyGen=null, importSharedSecret=null,<br>
>>> generateSubsystemCert=null, sharedDB=false, sharedDBUserDN=null,<br>
>>> createNewDB=true, setupReplication=True, subordinateSecurityDomainNamen<wbr>ull]<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: === Token Panel ===<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: === Security Domain Panel ===<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: Joining existing security<br>
>>> domain<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: Resolving security domain<br>
>>> URLhttps://ipa-server.nelios:<wbr>443<br>
>>> [09/Sep/2016:08:22:51][http-<wbr>bio-8443-exec-3]: Getting security domain<br>
>>> cert chain<br>
>>> [09/Sep/2016:08:22:52][http-<wbr>bio-8443-exec-3]: Getting install token<br>
>>> [09/Sep/2016:08:22:52][http-<wbr>bio-8443-exec-3]: Getting install token<br>
>>> [09/Sep/2016:08:22:52][http-<wbr>bio-8443-exec-3]: Getting old cookie<br>
>>> [09/Sep/2016:08:22:52][http-<wbr>bio-8443-exec-3]: Token: null<br>
>>> [09/Sep/2016:08:22:52][http-<wbr>bio-8443-exec-3]: Install token is null<br>
>>> [09/Sep/2016:08:22:52][http-<wbr>bio-8443-exec-3]: Failed to obtain<br>
>>> installation token from security domain<br>
>>><br>
>>> I assume it is the null token the perpetrator ? if yes what should I fix<br>
>>> on master?<br>
>>><br>
>> I don't know this part much. Therefore CCing PKI experts - in addition<br>
>> to figure out if there is anything to fix on IPA or PKI side.<br>
>><br>
>> Endi, Matthew,<br>
>><br>
>> do I understand it correctly that for obtaining the token, it contacts<br>
>> master server with<br>
>>     pki_security_domain_user == admin<br>
>>     pki_security_domain_password == whatever provided in ipa-replica-install<br>
>><br>
>> pki_security_domain_user matches uid=admin,ou=people,o=ipaca which has a<br>
>> password which was set during ipa-server-install(and thus pkisilent) on<br>
>> original 6.x server.<br>
>><br>
>> Therefore if admin password changed between these two installations then<br>
>> it will fail obtain the cookie? (guessing that wrong credential might be<br>
>> the reason)<br>
><br>
><br>
> If I look for uid=admin,ou=people,o=ipaca on  master (ipa v3, centos 6.x) this<br>
> is what I get:<br>
><br>
> [root@ipa-server ~]# ldapsearch -D "cn=directory manager" -W -p 389 -h localhost<br>
> -b "uid=admin,ou=people,o=ipaca,<wbr>dc=nelios"<br>
><br>
> # extended LDIF<br>
> #<br>
> # LDAPv3<br>
> # base <uid=admin,ou=people,o=ipaca,<wbr>dc=nelios> with scope subtree<br>
> # filter: (objectclass=*)<br>
> # requesting: ALL<br>
> #<br>
><br>
> # search result<br>
> search: 2<br>
> result: 32 No such object<br>
> matchedDN: dc=nelios<br>
><br>
> # numResponses: 1<br>
><br>
> LDAP manager password seems to be correct as I used it more than once in the<br>
> last few days  to remove the failing replicas.<br>
><br>
<br>
</div></div>You search for wrong dn:<br>
  uid=admin,ou=people,o=ipaca,<wbr>dc=nelios<br>
instead of:<br>
  uid=admin,ou=people,o=ipaca<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Petr Vobornik<br>
</font></span></blockquote></div><br></div>