#49458 db2ldif with-s export fails with error -9 , DS console export broken
Closed: worksforme 9 hours ago by mreynolds. Opened 2 years ago by msauton.

Issue Description

regression:

The db2ldif -s option seem to be rejected by the server:

db2ldif.pl -D "cn=directory manager" -w password -r -a /tmp/m1.userroot.replica.export.ldif -s dc=example,dc=com
Exporting to ldif file: /tmp/m1.userroot.replica.export.ldif
ldap_add: Bad parameter to an ldap routine (-9)
Failed to add task entry "cn=export_2017_11_20_20_21_16, cn=export, cn=tasks, cn=config" error (247)

but -n works as usual:

db2ldif.pl -D "cn=directory manager" -w password -r -a /tmp/m1.userroot.replica.export.ldif -n userroot
Exporting to ldif file: /tmp/m1.userroot.replica.export.ldif
Successfully added task entry "cn=export_2017_11_20_20_21_38, cn=export, cn=tasks, cn=config"

A side effect is in the RHDS-10 console, an export task always fails with error -9 in a pop-up window, task not created, nothing is exported.

How reproducible:
always

Package Version and Platform

Red Hat Enterprise Linux Server release 7.4 (Maipo)
389-ds-base-1.3.6.1-21.el7_4.x86_64
redhat-idm-console-10.1.0-2.el7dsrv.x86_64
idm-console-framework-1.1.17-4.el7dsrv.noarch

Steps to reproduce

  1. Have RHEL-7 and RHDS-10 setup
  2. db2ldif.pl -D "cn=directory manager" -w password -r -a /tmp/m1.userroot.replica.export.ldif -s dc=example,dc=com

Actual results

ldap_add: Bad parameter to an ldap routine (-9)

Expected results

allow backups using suffixes like before, not just backends


Red Hat bz 1515462 - db2ldif with-s export fails with error -9 , DS console export broken

I can not reproduce the issue on 1.3.6 (upstream) or on master.

db2ldif.pl -s dc=example,dc=com -D cn=dm -w password -a /tmp/ldif.ldif
Exporting to ldif file: /tmp/ldif.ldif
Successfully added task entry "cn=export_2017_11_20_15_50_26, cn=export, cn=tasks, cn=config"

[20/Nov/2017:15:51:46.103245181 -0500] - INFO - task_export_thread - Beginning export of 'userroot'
[20/Nov/2017:15:51:46.112624724 -0500] - INFO - ldbm_back_ldbm2ldif - export userroot: Processed 9 entries (100%).
[20/Nov/2017:15:51:46.115501430 -0500] - INFO - task_export_thread - Export finished

The downstream RHEL builds need to be tested next...

Metadata Update from @mreynolds:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1515462
- Custom field type adjusted to None
- Custom field version adjusted to None

2 years ago

The DS task export error -9 does NOT seem to always happen on demand, but I was able to experience the situation several times, like this:

RHEL-7.4 RHDS-10
389-ds-base-1.3.6.1-24.el7_4.x86_64
389-console-1.1.18-2.el7dsrv.noarch
389-ds-console-1.2.16-1.el7dsrv.noarch
idm-console-framework-1.1.17-4.el7dsrv.noarch
389-admin-console-1.1.12-2.el7dsrv.noarch

/usr/bin/389-console -x nologo -u admin -w password -a http://m1.example.com:8888/

then in the DS console, select:
Tasks | Export Databases | LDIF file /tmp/c.us.ldif | "on server machine" Subtree | c=US

there is a different behavior and log activity before the task is created when the export succeeds.

when FAIL:

popup window with title "Error Updating Directory"
and message:
"
netscape.ldap.LDAPException: error result (-9)
OK
"

the DS logs, always the same unexpected activity when failing:

==> /var/log/dirsrv/slapd-m2/errors <==
[15/Jan/2018:01:17:46.361233698 +0000] - DEBUG - auto-membership-plugin - automember_add_post_op - Error retrieving post-op entry cn=export1515979066780,cn=export,cn=tasks,cn=config
[15/Jan/2018:01:17:46.389588902 +0000] - DEBUG - linkedattrs-plugin - linked_attrs_add_post_op - Error retrieving post-op entry cn=export1515979066780,cn=export,cn=tasks,cn=config
[15/Jan/2018:01:17:46.406195451 +0000] - DEBUG - managed-entries-plugin - mep_add_post_op - Error retrieving post-op entry cn=export1515979066780,cn=export,cn=tasks,cn=config
[15/Jan/2018:01:17:46.423053835 +0000] - DEBUG - roles-plugin - --> roles_post_op
[15/Jan/2018:01:17:46.439421425 +0000] - DEBUG - roles-plugin - --> roles_cache_change_notify
[15/Jan/2018:01:17:46.456156519 +0000] - DEBUG - roles-plugin - <-- roles_post_op

==> /var/log/dirsrv/slapd-m2/access <==
[15/Jan/2018:01:17:37.118800755 +0000] conn=1 op=184 SRCH base="cn=ldbm database,cn=plugins,cn=config" scope=2 filter="(objectClass=nsBackendInstance)" attrs="nsslapd-suffix nsBackendSuffix"
[15/Jan/2018:01:17:37.120515956 +0000] conn=1 op=184 RESULT err=0 tag=101 nentries=4 etime=0
[15/Jan/2018:01:17:37.122078812 +0000] conn=1 op=185 SRCH base="" scope=0 filter="(objectClass=*)" attrs="nsslapd-suffix nsBackendSuffix"
[15/Jan/2018:01:17:37.122786452 +0000] conn=Internal op=-1 SRCH base="cn=config,cn=userRoot,cn=ldbm database,cn=plugins,cn=config" scope=1 filter="objectclass=vlvsearch" attrs=ALL
[15/Jan/2018:01:17:37.123066770 +0000] conn=Internal op=-1 RESULT err=0 tag=48 nentries=0 etime=0
[15/Jan/2018:01:17:37.123089166 +0000] conn=Internal op=-1 SRCH base="cn=config,cn=us,cn=ldbm database,cn=plugins,cn=config" scope=1 filter="objectclass=vlvsearch" attrs=ALL
[15/Jan/2018:01:17:37.123385384 +0000] conn=Internal op=-1 RESULT err=0 tag=48 nentries=0 etime=0
...snip...
[15/Jan/2018:01:17:46.361029129 +0000] conn=1 op=190 ADD dn="cn=export1515979066780,cn=export,cn=tasks,cn=config"
[15/Jan/2018:01:17:46.473092010 +0000] conn=1 op=190 RESULT err=-9 tag=105 nentries=0 etime=1

when the task export works from the DS console, the errors log and plug-in activity is very different with a number of loops for each db/suffix although only one was asked, but it worked ok:

Jan 15 01:39:57 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:57.131898818 +0000] - DEBUG - NS7bitAttr - preop_add - ADD begin
Jan 15 01:39:57 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:57.152788898 +0000] - DEBUG - NS7bitAttr - preop_add - ADD target=cn=export1515980397550,cn=export,cn=tasks,cn=config
Jan 15 01:39:57 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:57.195428897 +0000] - DEBUG - roles-plugin - --> roles_post_op
Jan 15 01:39:57 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:57.227978671 +0000] - DEBUG - roles-plugin - --> roles_cache_change_notify
Jan 15 01:39:57 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:57.253001926 +0000] - DEBUG - roles-plugin - <-- roles_cache_change_notify - Not a role entry
Jan 15 01:39:57 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:57.277824967 +0000] - DEBUG - roles-plugin - <-- roles_post_op
Jan 15 01:39:58 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:39:58.134285222 +0000] - DEBUG - NS7bitAttr - preop_modify - MODIFY begin
...snip...
Jan 15 01:40:02 m2.example.com ns-slapd[1083]: [15/Jan/2018:01:40:02.456963554 +0000] - DEBUG - NS7bitAttr - preop_modify - MODIFY begin
...snip...
==> /var/log/dirsrv/slapd-m2/errors <==
[15/Jan/2018:01:40:07.601875080 +0000] - DEBUG - roles-plugin - <-- roles_post_op
[15/Jan/2018:01:41:19.163407972 +0000] - DEBUG - linkedattrs-plugin - linked_attrs_add_post_op - Error retrieving post-op entry cn=repl keep alive 23111,c=US
[15/Jan/2018:01:41:19.183483940 +0000] - DEBUG - roles-plugin - --> roles_post_op
[15/Jan/2018:01:41:19.199996124 +0000] - DEBUG - roles-plugin - --> roles_cache_change_notify
[15/Jan/2018:01:41:19.225029634 +0000] - DEBUG - roles-plugin - <-- roles_post_op
[15/Jan/2018:01:41:19.419966571 +0000] - DEBUG - NS7bitAttr - preop_modify - MODIFY begin
[15/Jan/2018:01:41:19.433526684 +0000] - DEBUG - roles-plugin - --> roles_post_op
[15/Jan/2018:01:41:19.449828594 +0000] - DEBUG - roles-plugin - --> roles_cache_change_notify
[15/Jan/2018:01:41:19.466540768 +0000] - DEBUG - roles-plugin - <-- roles_cache_change_notify - Not a role entry
[15/Jan/2018:01:41:19.483188640 +0000] - DEBUG - roles-plugin - <-- roles_post_op

==> /var/log/dirsrv/slapd-m2/access <==
[15/Jan/2018:01:41:19.161278670 +0000] conn=Internal op=-1 RESULT err=0 tag=48 nentries=1 etime=0
[15/Jan/2018:01:41:19.161323838 +0000] conn=Internal op=-1 SRCH base="cn=c\3DUS,cn=mapping tree,cn=config" scope=0 filter="objectclass=nsMappingTree" attrs="nsslapd-state"
[15/Jan/2018:01:41:19.161465210 +0000] conn=Internal op=-1 RESULT err=0 tag=48 nentries=1 etime=0

==> /var/log/dirsrv/slapd-m2/audit <==
modifiersName: cn=directory manager
createTimestamp: 20180115013956Z
modifyTimestamp: 20180115013956Z

time: 20180115014006
dn: cn=export1515980397550,cn=export,cn=tasks,cn=config
result: 0
changetype: delete
modifiersname: cn=server,cn=plugins,cn=config

Closing ticket. console is deprecated and about to go away. There is no reproducer, and the original customer cases have been closed after applying updates to DS/admin packages.

Metadata Update from @mreynolds:
- Issue close_status updated to: worksforme
- Issue status updated to: Closed (was: Open)

9 hours ago

Login to comment on this ticket.

Metadata