This bug is created as a clone of upstream ticket: https://fedorahosted.org/freeipa/ticket/2939 A backtrace is displayed when trying to prepare a replica file with the local LDAP server down. {{{ # ipactl stop # ipa-replica-prepare tove.example.com Directory Manager (existing master) password: ipa: INFO: Unhandled LDAPError: {'desc': "Can't contact LDAP server"} preparation of replica failed: Can't contact LDAP server: Can't contact LDAP server: File "/usr/sbin/ipa-replica-prepare", line 461, in <module> main() File "/usr/sbin/ipa-replica-prepare", line 263, in main conn.connect(bind_dn='cn=directory manager', bind_pw=dirman_password) File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 63, in connect conn = self.create_connection(*args, **kw) File "/usr/lib/python2.7/site-packages/ipalib/encoder.py", line 198, in new_f return f(*new_args, **kwargs) File "/usr/lib/python2.7/site-packages/ipaserver/plugins/ldap2.py", line 476, in create_connection _handle_errors(e) File "/usr/lib/python2.7/site-packages/ipaserver/plugins/ldap2.py", line 241, in _handle_errors raise errors.DatabaseError(desc=desc, info=info) }}}
Fixed upstream: master: https://fedorahosted.org/freeipa/changeset/2e00a9f45cd7c3191902f9b20ec4879096589219
[root@mvarun yum.repos.d]# ipactl stop Stopping EXTID Service Shutting down Winbind services: [ OK ] Stopping ADTRUST Service Shutting down SMB services: [ OK ] Stopping CA Service Stopping pki-ca: [ OK ] Stopping HTTP Service Stopping httpd: [ OK ] Stopping MEMCACHE Service Stopping ipa_memcached: [ OK ] Stopping DNS Service Stopping named: . [ OK ] Stopping KPASSWD Service Stopping Kerberos 5 Admin Server: [ OK ] Stopping KDC Service Stopping Kerberos 5 KDC: [ OK ] Stopping Directory Service Shutting down dirsrv: NOVTESTRELM-COM... [ OK ] PKI-IPA... [ OK ] [root@mvarun yum.repos.d]# ipa-replica-prepare cloud-qe-12.testrelm.com Directory Manager (existing master) password: preparation of replica failed: cannot connect to u'ldapi://%2fvar%2frun%2fslapd-NOVTESTRELM-COM.socket': LDAP Server Down cannot connect to u'ldapi://%2fvar%2frun%2fslapd-NOVTESTRELM-COM.socket': LDAP Server Down File "/usr/sbin/ipa-replica-prepare", line 490, in <module> main() File "/usr/sbin/ipa-replica-prepare", line 274, in main conn.connect(bind_dn=DN(('cn', 'directory manager')), bind_pw=dirman_password) File "/usr/lib/python2.6/site-packages/ipalib/backend.py", line 63, in connect conn = self.create_connection(*args, **kw) File "/usr/lib/python2.6/site-packages/ipaserver/plugins/ldap2.py", line 839, in create_connection self.handle_errors(e) File "/usr/lib/python2.6/site-packages/ipaserver/plugins/ldap2.py", line 729, in handle_errors error=u'LDAP Server Down') [root@mvarun yum.repos.d]# rpm -q ipa-server ipa-server-3.0.0-24.el6.x86_64 [root@mvarun yum.repos.d]# [root@mvarun yum.repos.d]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 Beta (Santiago) [root@mvarun yum.repos.d]# uname -a Linux mvarun.novtestrelm.com 2.6.32-345.el6.x86_64 #1 SMP Wed Nov 28 21:10:19 EST 2012 x86_64 x86_64 x86_64 GNU/Linux [root@mvarun yum.repos.d]# [root@mvarun yum.repos.d]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.70.1.181 mvarun.novtestrelm.com mvarun 10.16.96.103 cloud-qe-12.testrelm.com
Fixed upstream: master: 26c498736ec8eabb8dafbc090811c92c79a8c318
Also pushed to ipa-3-1: f6a564720068a1e63fa1966f4e5f7b7bb7c969f4 e43749176a3c19038f4a2bb043859a3a9d4d1ce9
Verified against ipa-server-3.3.3-6.el7.x86_64 [root@ipaqavmb ~]# ipactl stop Stopping Directory Service Stopping ipa-otpd Service Stopping pki-tomcatd Service Stopping httpd Service Stopping ipa_memcached Service Stopping named Service Stopping kadmin Service Stopping krb5kdc Service ipa: INFO: The ipactl command was successful [root@ipaqavmb ~]# ipa-replica-prepare --ip-address=10.16.98.181 verifyhost.testrelm.com Directory Manager (existing master) password: cannot connect to 'ldapi://%2fvar%2frun%2fslapd-TESTRELM-COM.socket':
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.