RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 842874 - backtrace if creating replica while LDAP is down
Summary: backtrace if creating replica while LDAP is down
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 7.0
Assignee: Rob Crittenden
QA Contact: Michael Gregg
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-24 19:25 UTC by Jenny Severance
Modified: 2014-08-05 11:18 UTC (History)
4 users (show)

Fixed In Version: ipa-3.2.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:42:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jenny Severance 2012-07-24 19:25:16 UTC
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)

}}}

Comment 1 Martin Kosek 2012-08-14 13:51:03 UTC
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/2e00a9f45cd7c3191902f9b20ec4879096589219

Comment 4 Varun Mylaraiah 2013-01-29 15:28:01 UTC
[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

Comment 6 Tomas Babej 2013-02-03 21:05:26 UTC
Fixed upstream:

master: 26c498736ec8eabb8dafbc090811c92c79a8c318

Comment 10 Rob Crittenden 2013-02-04 15:46:39 UTC
Also pushed to ipa-3-1:

f6a564720068a1e63fa1966f4e5f7b7bb7c969f4
e43749176a3c19038f4a2bb043859a3a9d4d1ce9

Comment 12 Michael Gregg 2014-01-03 19:41:32 UTC
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':

Comment 13 Ludek Smid 2014-06-13 12:42:19 UTC
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.


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