Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1356626

Summary: /var/log/messages file displays traceback for ipa-dnskeysyncd service during ipa-server-install
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: frenaud, pasik, pvoborni, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-19 11:57:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sudhir Menon 2016-07-14 13:57:06 UTC
Description of problem:/var/log/messages file displays traceback  for ipa-dnskeysyncd  during ipa-server-install

Version-Release number of selected component (if applicable):
ipa-server-4.4.0-1.el7.x86_64

How reproducible:Always


Steps to Reproduce:
1. ipa-server-install
2. Check the logging done in /var/log/messages file


Actual results:
Jul 14 17:14:23 server systemd: Stopping 389 Directory Server TESTRELM-TEST....
Jul 14 17:14:24 server ns-slapd: [14/Jul/2016:17:14:24.214272576 +051800] slapd shutting down - signaling operation threads - op stack size 7 max work q size 2 max work q stack size 2
Jul 14 17:14:24 server ns-slapd: [14/Jul/2016:17:14:24.313968684 +051800] slapd shutting down - closing down internal subsystems and plugins
Jul 14 17:14:24 server ns-slapd: [14/Jul/2016:17:14:24.472691535 +051800] Waiting for 4 database threads to stop
Jul 14 17:14:25 server ns-slapd: [14/Jul/2016:17:14:25.287364336 +051800] All database threads now stopped
Jul 14 17:14:25 server ipa-dnskeysyncd: ipa         : ERROR    syncrepl_poll: LDAP error ({'desc': "Can't contact LDAP server"})
Jul 14 17:14:25 server ipa-dnskeysyncd: Traceback (most recent call last):
Jul 14 17:14:25 server ipa-dnskeysyncd: File "/usr/libexec/ipa/ipa-dnskeysyncd", line 110, in <module>
Jul 14 17:14:25 server ipa-dnskeysyncd: while ldap_connection.syncrepl_poll(all=1, msgid=ldap_search):
Jul 14 17:14:25 server ipa-dnskeysyncd: File "/usr/lib64/python2.7/site-packages/ldap/syncrepl.py", line 348, in syncrepl_poll
Jul 14 17:14:25 server ipa-dnskeysyncd: add_intermediates=1, add_ctrls=1, all = 0
Jul 14 17:14:25 server ipa-dnskeysyncd: File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 476, in result4
Jul 14 17:14:25 server ipa-dnskeysyncd: ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
Jul 14 17:14:25 server ipa-dnskeysyncd: File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 99, in _ldap_call
Jul 14 17:14:25 server ipa-dnskeysyncd: result = func(*args,**kwargs)
Jul 14 17:14:25 server ipa-dnskeysyncd: SERVER_DOWN: {'desc': "Can't contact LDAP server"}
Jul 14 17:14:25 server named-pkcs11[19634]: LDAP error: Can't contact LDAP server: ldap_sync_poll() failed
Jul 14 17:14:25 server named-pkcs11[19634]: ldap_syncrepl will reconnect in 60 seconds
Jul 14 17:14:25 server ns-slapd: [14/Jul/2016:17:14:25.423626626 +051800] slapd shutting down - freed 2 work q stack objects - freed 7 op stack objects

Expected results:
Although ipactl status shows the command running, /var/log/messages file reports this traceback that it cannot connect to ldap server.

[root@server ~]# systemctl status ipa-dnskeysyncd.service -l
● ipa-dnskeysyncd.service - IPA key daemon
   Loaded: loaded (/usr/lib/systemd/system/ipa-dnskeysyncd.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2016-07-14 17:15:26 IST; 1h 47min ago
 Main PID: 20282 (ipa-dnskeysyncd)
   CGroup: /system.slice/ipa-dnskeysyncd.service
           └─20282 /usr/bin/python2 /usr/libexec/ipa/ipa-dnskeysyncd
 
Jul 14 17:15:29 server.testrelm.test python2[20282]: GSSAPI client step 1
Jul 14 17:15:29 server.testrelm.test python2[20282]: GSSAPI client step 1
Jul 14 17:15:29 server.testrelm.test python2[20282]: GSSAPI client step 1
Jul 14 17:15:30 server.testrelm.test python2[20282]: GSSAPI client step 2
Jul 14 17:15:30 server.testrelm.test ipa-dnskeysyncd[20282]: ipa         : INFO     Commencing sync process
Jul 14 17:15:33 server.testrelm.test ipa-dnskeysyncd[20282]: ipa.ipapython.dnssec.keysyncer.KeySyncer: INFO     Initial LDAP dump is done, sychronizing with ODS and BIND
Jul 14 17:15:37 server.testrelm.test python2[20299]: GSSAPI client step 1
Jul 14 17:15:37 server.testrelm.test python2[20299]: GSSAPI client step 1
Jul 14 17:15:37 server.testrelm.test python2[20299]: GSSAPI client step 1
Jul 14 17:15:38 server.testrelm.test python2[20299]: GSSAPI client step 2

[root@server ~]# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
ipa_memcached Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
ntpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful

Additional info:

Comment 1 Petr Vobornik 2016-07-14 14:00:50 UTC
Can we just catch the exception print error and fail gracefully instead of traceback?

Comment 3 Petr Spacek 2016-07-18 07:44:44 UTC
We can but it is not a systematic fix, it just hides the problem as makes debugging harder.

It would rather fix service handling in IPA so dependent services are stopped *before* LDAP server shut down and restarted when the server is up.

Killing LDAP server without shutting down other services just add risk that we will end up with inconsistent data in LDAP because the 'dependent' daemon was in the middle of something.

Comment 4 Petr Vobornik 2016-07-21 16:22:24 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6108

Comment 8 Florence Blanc-Renaud 2018-10-19 11:57:39 UTC
This issue hasn't been seen recently, and the suggestion from comment 3 has already been implemented (slapd is stopped last) hence closing as CURRENTRELEASE.