OUD Sorted Search Error 12 (Doc ID 2215182.1)

Last updated on DECEMBER 16, 2016

Applies to:

Oracle Unified Directory - Version 11.1.2.3.160419 and later
Information in this document applies to any platform.
To Search Using the Server-Side Sort Control

The Server-Side Sort Control allows the client to request that the server sort the search results before sending them to the client. This is convenient when the server has indexes that can satisfy the sort order requested by the client faster than the client can.

You can sort the number of entries returned by using the --sortOrder option. If you do not specify + (a plus sign) for ascending or - (a minus sign) for descending, then the default option is to sort in ascending order.

Use the ldapsearch command to search all entries and to display the results in ascending order.
Use the --sortOrder option sorted on the attributes sn and givenName.

$ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
--s sub -b dc=example,dc=com --sortorder sn,givenName "(objectclass)"
dn: uid=dakers,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
......
Use the ldapsearch command to search all entries and display the results in descending order.
Use the --sortorder option sorted on the attribute sn.

$ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
-s sub -b dc=example,dc=com --sortOrder -sn "(objectclass)"
dn: uid=pworrell,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
......

Symptoms

While trying to migrate from an OID/OVD environment to a newer OUD/OVD environment, one of the application maintainers has identified a problem performing the server side sort.

After some load balancer adjustments,  tested from the application again got the following error. Some snippets from a) OVD access log, b) OVD diagnostic log, and c) OUD access log, are:
[2016-12-08T11:40:32.103-05:00] [octetstring] [NOTIFICATION] [OVD-20043] [com.octetstring.accesslog] [tid: 37] [ecid: 0000LZVJgXbC^qcLTiS4yc1OBowI000Q_w,0] conn=390,786 op=1 SRCH base=ou=people,dc=dev,dc=test,dc=com scope=2 filter=(|(&(|(|(testPhoneBookDisplayName=*r10e*))(|(givenName=*r10e*))(|(sn=*r10e*))(|(testEmailName=*r10e*))(|(mail=*r10e*))(|(telephoneNumber=*r10e*))(|(physicalDeliveryOfficeName=*r10e*))(|(postOfficeBox=*r10e*))(|(employeeNumber=*r10e*))(|(testAssignedcom=*r10e*))))) requestedAttributes=[employeeNumber] sizelimit=201 timelimit=0 typesOnly=FALSE
[2016-12-08T11:40:32.115-05:00] [octetstring] [NOTIFICATION] [OVD-20044] [com.octetstring.accesslog] [tid: 37] [ecid: 0000LZVJgXbC^qcLTiS4yc1OBowI000Q_w,0] conn=390,786 op=1 RESULT err=53 tag=0 nentries=0 etime=12 dbtime=0 mem=155,758,320/257,949,696

[2016-12-08T11:40:32.113-05:00] [octetstring] [WARNING] [OVD-40066] [com.octetstring.vde.backend.jndi.ConnectionHandle] [tid: 37] [ecid: 0000LZVJgXbC^qcLTiS4yc1OBowI000Q_w,0] Remote Server Failure:testdev1.test.com:10636.[[
javax.naming.OperationNotSupportedException: [LDAP: error code 12 - The search results cannot be sorted because the given search request is not indexed]; remaining name 'ou=People,dc=test,dc=com'

[08/Dec/2016:11:40:32 -0500] SEARCH REQ conn=209369 op=25379 msgID=25380 base="ou=People,dc=test,dc=com" scope=sub filter="(|(testPhoneBookDisplayName=*r10e*)(givenName=*r10e*)(sn=*r10e*)(testEmailName=*r10e*)(mail=*r10e*)(physicalDeliveryOfficeName=*r10e*)(employeeNumber=*r10e*)(testAssignedcom=*r10e*))" attrs="testEmailName,postOfficeBox,givenName,employeeNumber,sn,testPhoneBookDisplayName,testAssignedcom,physicalDeliveryOfficeName,mail,telephoneNumber"
[08/Dec/2016:11:40:32 -0500] SEARCH RES conn=209369 op=25379 msgID=25380 result=12 message="The search results cannot be sorted because the given search request is not indexed" nentries=0 etime=2





Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms