<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">FYI,<br>
<br>
These are IPA replicas being re-added.<br>
<br>
I removing these replman lines in the installer script:<br>
------------------------------------------------------------------------------------------------------------<br>
    # Try out the password<br>
    ldapuri = 'ldaps://%s' % ipautil.format_netloc(config.master_host_name)<br>
    try:<br>
        conn = ldap2(shared_instance=False, ldap_uri=ldapuri, base_dn='')<br>
        conn.connect(bind_dn=DN(('cn', 'directory manager')),<br>
                     bind_pw=config.dirman_password,<br>
                     tls_cacertfile=CACERT)<br>
        replman = ReplicationManager(config.realm_name, config.master_host_name,<br>
                                     config.dirman_password)<br>
        found = False<br>
        try:<br>
            entry = conn.find_entries(u'fqdn=%s' % host, ['dn', 'fqdn'], DN(api.env.container_host, api.env.basedn))<br>
            print "The host %s already exists on the master server.\nYou should remove it before proceeding:" % host<br>
            print "    %% ipa host-del %s" % host<br>
            found = True<br>
        except errors.NotFound:<br>
            pass<br>
        try:<br>
            (agreement_cn, agreement_dn) = replman.agreement_dn(host)<br>
            entry = conn.get_entry(agreement_dn, ['*'])<br>
            print "A replication agreement for this host already exists. It needs to be removed. Run this on the master that generated the info file:"<br>
            print "    %% ipa-replica-manage del %s --force" % host<br>
            found = True<br>
        except errors.NotFound:<br>
            pass<br>
        if found:<br>
            sys.exit(3)<br>
    except errors.ACIError:<br>
        sys.exit("\nThe password provided is incorrect for LDAP server %s" % config.master_host_name)<br>
    except errors.LDAPError:<br>
        sys.exit("\nUnable to connect to LDAP server %s" % config.master_host_name)<br>
    finally:<br>
        if conn and conn.isconnected():<br>
            conn.disconnect()<br>
        if replman and replman.conn:<br>
            replman.conn.unbind_s()<br>
------------------------------------------------------------------------------------------------------------<br>
<br>
<br>
and then ran the install again but it is now failing on:<br>
------------------------------------------------------------------------------------------------------------<br>
ipa         : DEBUG    stderr=<br>
ipa         : DEBUG    wait_for_open_ports: localhost [9180, 9443, 9444] timeout 120<br>
ipa         : INFO       File "/usr/lib/python2.6/site-packages/ipaserver/install/installutils.py", line 614, in run_script<br>
    return_value = main_function()<br>
<br>
  File "/usr/sbin/ipa-replica-install", line 433, in main<br>
    install_dns_records(config, options)<br>
<br>
  File "/usr/sbin/ipa-replica-install", line 251, in install_dns_records<br>
    dm_password=config.dirman_password):<br>
<br>
  File "/usr/lib/python2.6/site-packages/ipaserver/install/bindinstance.py", line 192, in dns_container_exists<br>
    raise RuntimeError('LDAP server on %s is not responding. Is IPA installed?' % fqdn)<br>
<br>
ipa         : INFO     The ipa-replica-install command failed, exception: RuntimeError: LDAP server on ipabox1.domain.com is not responding. Is IPA installed?<br>
<br>
Your system may be partly configured.<br>
Run /usr/sbin/ipa-server-install --uninstall to clean up.<br>
<br>
LDAP server on ipabox1.domain.com is not responding. Is IPA installed?<br>
------------------------------------------------------------------------------------------------------------<br>
<br>
<br>
However LDAP ports on the IPA master are working and accessible(checked using telnet and ldapsearch).<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">Regards,<br>
Suhail Choudhury.<br>
<b>DevOps | Recommendations Team | BSkyB</b><br>
<br>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF491667"><font color="#000000" face="Tahoma" size="2"><b>From:</b> freeipa-users-bounces@redhat.com [freeipa-users-bounces@redhat.com] on behalf of Choudhury, Suhail [Suhail.Choudhury@bskyb.com]<br>
<b>Sent:</b> 15 July 2014 10:52<br>
<b>To:</b> freeipa-users@redhat.com<br>
<b>Subject:</b> [Freeipa-users] IPA Replica Install Failing with "UnboundLocalError: local variable 'replman' referenced before assignment"<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi,<br>
<br>
I'm trying to install some new IPA replicas but getting this installation error:<br>
--------------------------------------------------------------------------------------------------------------------------<br>
ipa         : DEBUG    importing plugin module '/usr/lib/python2.6/site-packages/ipaserver/install/plugins/rename_managed.py'<br>
ipa         : DEBUG    importing plugin module '/usr/lib/python2.6/site-packages/ipaserver/install/plugins/update_anonymous_aci.py'<br>
ipa         : DEBUG    importing plugin module '/usr/lib/python2.6/site-packages/ipaserver/install/plugins/update_services.py'<br>
ipa         : DEBUG    importing plugin module '/usr/lib/python2.6/site-packages/ipaserver/install/plugins/updateclient.py'<br>
ipa         : DEBUG    importing plugin module '/usr/lib/python2.6/site-packages/ipaserver/install/plugins/upload_cacrt.py'<br>
ipa         : DEBUG    ds group dirsrv exists<br>
ipa         : DEBUG    Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'<br>
ipa         : INFO       File "/usr/lib/python2.6/site-packages/ipaserver/install/installutils.py", line 614, in run_script<br>
    return_value = main_function()<br>
<br>
  File "/usr/sbin/ipa-replica-install", line 458, in main<br>
    if replman and replman.conn:<br>
<br>
ipa         : INFO     The ipa-replica-install command failed, exception: UnboundLocalError: local variable 'replman' referenced before assignment<br>
<br>
Your system may be partly configured.<br>
Run /usr/sbin/ipa-server-install --uninstall to clean up.<br>
<br>
Unexpected error - see /var/log/ipareplica-install.log for details:<br>
UnboundLocalError: local variable 'replman' referenced before assignment<br>
--------------------------------------------------------------------------------------------------------------------------<br>
<br>
<br>
These are the relevant lines in "ipa-replica-install":<br>
--------------------------------------------------------------------------------------------------------------------------<br>
        except errors.NotFound:<br>
            pass<br>
        if found:<br>
            sys.exit(3)<br>
    except errors.ACIError:<br>
        sys.exit("\nThe password provided is incorrect for LDAP server %s" % config.master_host_name)<br>
    except errors.LDAPError:<br>
        sys.exit("\nUnable to connect to LDAP server %s" % config.master_host_name)<br>
    finally:<br>
        if conn and conn.isconnected():<br>
            conn.disconnect()<br>
        if replman and replman.conn:<br>
            replman.conn.unbind_s()<br>
--------------------------------------------------------------------------------------------------------------------------<br>
<br>
<br>
This is on a freshly installed and updated CentOS release 6.5 (Final) box running "2.6.32-431.20.3.el6.x86_64" kernel, SELinux disabled and with the following IPA packages:<br>
<br>
ipa-pki-common-theme-9.0.3-7.el6.noarch<br>
ipa-python-3.0.0-37.el6.x86_64<br>
ipa-client-3.0.0-37.el6.x86_64<br>
ipa-admintools-3.0.0-37.el6.x86_64<br>
ipa-server-selinux-3.0.0-37.el6.x86_64<br>
libipa_hbac-python-1.9.2-129.el6_5.4.x86_64<br>
ipa-pki-ca-theme-9.0.3-7.el6.noarch<br>
libipa_hbac-1.9.2-129.el6_5.4.x86_64<br>
ipa-server-3.0.0-37.el6.x86_64<br>
python-iniparse-0.3.1-2.1.el6.noarch<br>
<br>
<br>
Any help/ideas much appreciated.<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">Regards,<br>
Suhail Choudhury.<br>
<b>DevOps | Recommendations Team | BSkyB</b><br>
<br>
</div>
</div>
</div>
</div>
</div>
Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please
 notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and
 external networks. SKY and the SKY marks are trademarks of British Sky Broadcasting Group plc and Sky International AG and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075)
 and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and
 share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD. </div>
</div>
</div>
Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please
 notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and
 external networks. SKY and the SKY marks are trademarks of British Sky Broadcasting Group plc and Sky International AG and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075)
 and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and
 share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.
</body>
</html>