In RHDS when we try to create a specific object in a specific OU, it fails with the error: "database index operation failed BAD 1031, err=9999 Unknown error 9999"

Solution Verified - Updated -

Environment

  • Red Hat Directory Server 9.0
  • Red Hat Directory Server 10
  • Red Hat Directory Server 11

Issue

In RHDS when we try to create a specific object in a specific OU, it fails with the error: "database index operation failed BAD 1031, err=9999 Unknown error 9999"

We have a 4 node multimaster cluster that seems to be running ok. In this specific node , when we try to create a object under a certain "OU" it fails with the following errors in error logs.

dn2entry_ext: the dn "ou=IDM,ou=Users,ou=example,dc=com" was in the entryrdn index, but it did not exist in id2entry of instance userRoot.
entryrdn-index - _entryrdn_insert_key: Same DN (dn: ou=IDM,ou=Users,ou=example,dc=com) is already in the entryrdn file with different ID 83890.  Expected ID is 145471.
database index operation failed BAD 1031, err=9999 Unknown error 9999
add: attempt to index 145471 failed

The ou "ou=IDM,ou=Users,ou=example,dc=com" was available on 3 of the 4 nodes on our cluster. Changes were also only replicated to those 3. This ou was created many months ago but we only discovered this problem last week.

We deleted this "OU" on one of the servers that had the ou. Doing this, the "OU" was no longer on any of our 4 nodes.
When we re-created the "OU" on any to the 3 other server, the "OU" was successfully replicated to all 3 instantly, but never to the initial problem server.

Resolution

re-creating the index to resolve the issue:

/usr/lib64/dirsrv/slapd-(instance)/db2index.pl -D "cn=directory manager" -w - -n userRoot -t entryrdn

Root Cause

Unindex attributes or system affected by recovery process.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments