[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Index for objectclass does not work...



2011/1/4 Quanah Gibson-Mount <quanah@zimbra.com>:
> --On Tuesday, January 04, 2011 1:08 AM +0100 Steeg Carson
> <steeg.carson@googlemail.com> wrote:
>
>>> This does not look like a valid ldapsearch:
>>>
>>> ldapsearch -x -h localhost -D"uid=admin,ou=root" -b"cn=ou=root>"
>>> "(ObjectClass=subEngine)" dn | grep "^dn:" | wc -l)
>>>
>>> The -b setting in particular looks broken, which is problem why you are
>>> getting that message.
>>
>> Sorry, the base DN in the search should be -b"ou=root", my mistake. I
>> tried to shorten it in the message...
>
> Please provide the exact ldapsearch in its entirety then (minus any
> password).
>

I simulate this on my database just right now:

=>set logelevel 33

echo >/var/log/messages
# time ldapsearch -x -h localhost -wpassword -D"uid=admin,ou=root"
-b"ou=root" "(objectClass=subEngine)" dn | grep "^dn:" | wc -l
104384

real    1m45.518s
user    0m1.208s
sys     0m1.332s


grep "hdb_search:" /var/log/messages | wc -l
366201


=> result form messages:
###################################################
backend_startup_one: starting "ou=root"
hdb_db_open: database "ou=root": dbenv_open(/var/lib/ldap_hdb).
hdb_monitor_db_open: monitoring disabled; configure monitor database to enable
slapd starting
slap_listener_activate(7):
>>> slap_listener(ldap:///)
connection_get(12): got connid=1000
connection_read(12): checking for input on id=1000
op tag 0x60, time 1294100496
conn=1000 op=0 do_bind
>>> dnPrettyNormal: <>
<<< dnPrettyNormal: <>, <>
do_bind: version=3 dn="" method=128
send_ldap_result: conn=1000 op=0 p=3
send_ldap_response: msgid=1 tag=97 err=48
do_bind: v3 anonymous bind
connection_get(12): got connid=1000
connection_read(12): checking for input on id=1000
ber_get_next on fd 12 failed errno=0 (Success)
connection_close: conn=1000 sd=12
slap_listener_activate(7):
>>> slap_listener(ldap:///)
connection_get(12): got connid=1001
connection_read(12): checking for input on id=1001
op tag 0x60, time 1294100553
conn=1001 op=0 do_bind
>>> dnPrettyNormal: <uid=admin,ou=root>
<<< dnPrettyNormal: <uid=admin,ou=root>, <cn=root,ou=admins,ou=root>
do_bind: version=3 dn="uid=admin,ou=root" method=128
do_bind: v3 bind: "uid=admin,ou=root" to "uid=admin,ou=root"
send_ldap_result: conn=1001 op=0 p=3
send_ldap_response: msgid=1 tag=97 err=0
connection_get(12): got connid=1001
connection_read(12): checking for input on id=1001
op tag 0x63, time 1294100553
conn=1001 op=1 do_search
>>> dnPrettyNormal: <ou=root>
<<< dnPrettyNormal: <ou=root>, <ou=root>
begin get_filter
EQUALITY
end get_filter 0
=> hdb_search
bdb_dn2entry("ou=root")
=> hdb_dn2id("ou=root")
<= hdb_dn2id: got id=0x1
entry_decode: ""
<= entry_decode()
search_candidates: base="ou=root" (0x00000001) scope=2
=> hdb_dn2idl("ou=root")
=> bdb_filter_candidates
#011AND
=> bdb_list_candidates 0xa0
=> bdb_filter_candidates
#011OR
=> bdb_list_candidates 0xa1
=> bdb_filter_candidates
#011EQUALITY
=> bdb_equality_candidates (objectClass)
=> key_read
<= bdb_index_read: failed (-30989)
<= bdb_equality_candidates: id=0, first=0, last=0
<= bdb_filter_candidates: id=0 first=0 last=0
=> bdb_filter_candidates
#011EQUALITY
=> bdb_equality_candidates (objectClass)
=> key_read
<= bdb_index_read 470601 candidates
<= bdb_equality_candidates: id=-1, first=228, last=470828
<= bdb_filter_candidates: id=-1 first=228 last=470828
<= bdb_list_candidates: id=-1 first=228 last=470828
<= bdb_filter_candidates: id=-1 first=228 last=470828
<= bdb_list_candidates: id=-1 first=228 last=470828
<= bdb_filter_candidates: id=-1 first=228 last=470828
bdb_search_candidates: id=-1 first=228 last=470828
entry_decode: ""
<= entry_decode()
=> test_filter
    EQUALITY
<= test_filter 6
entry_decode: ""
<= entry_decode()
=> test_filter
    EQUALITY
<= test_filter 5
hdb_search: 229 does not match filter
entry_decode: ""
<= entry_decode()
=> test_filter
    EQUALITY
<= test_filter 5
hdb_search: 230 does not match filter
entry_decode: ""
<= entry_decode()
=> test_filter
    EQUALITY
<= test_filter 5
hdb_search: 231 does not match filter
entry_decode: ""
<= entry_decode()
=> test_filter
    EQUALITY
,
,
,
and so on


Thanks Steeg