Bug 842874 - backtrace if creating replica while LDAP is down
backtrace if creating replica while LDAP is down
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.0
Unspecified Unspecified
medium Severity unspecified
: rc
: 7.0
Assigned To: Rob Crittenden
Michael Gregg
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 15:25 EDT by Jenny Galipeau
Modified: 2014-08-05 07:18 EDT (History)
4 users (show)

See Also:
Fixed In Version: ipa-3.2.1-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:42:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jenny Galipeau 2012-07-24 15:25:16 EDT
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 09:51:03 EDT
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/2e00a9f45cd7c3191902f9b20ec4879096589219
Comment 4 Varun Mylaraiah 2013-01-29 10:28:01 EST
[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 16:05:26 EST
Fixed upstream:

master: 26c498736ec8eabb8dafbc090811c92c79a8c318
Comment 10 Rob Crittenden 2013-02-04 10:46:39 EST
Also pushed to ipa-3-1:

f6a564720068a1e63fa1966f4e5f7b7bb7c969f4
e43749176a3c19038f4a2bb043859a3a9d4d1ce9
Comment 12 Michael Gregg 2014-01-03 14:41:32 EST
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 08:42:19 EDT
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.