[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
slapcat, ldapsearch, slapindex all do nothing
Hi all.
I had this happen once before, and it caused me to rebuild the entire
server, and now it's happened again, and it's not funny anymore, since
this server will be production.
I'm running 2.1.21 on Redhat 9. Here are some other facts:
I'm using BerkleyDB 4.1.25.
My database directory contains databases, and they are all the same size
as they are on the test server that I migrated the data from. They're
not empty. I've also ensured that this *is* the directory slapd.conf
points at.
I was, earlier yesterday, able to search and browse the directory.
However, I did a 'modrdn' on an 'ou' to put it under another 'ou', and
that's the last change I remember making before things went haywire.
Currently, ldapsearch connects to the server just fine, but always
returns no results, no matter what I search for (including
'objectclass=*'). There's the debug output on the server below. There
are a few errors, but they're ones I've pretty much always gotten -
nothing here looks particularly interesting, just looks like an average
'your search didn't match anything' response.
I noticed, by the way, that doing these searches touches the 'dn2id.bdb'
and 'id2entry.bdb' files - along with one of the logs in my data
directory - but that's it. The rest are untouched since yesterday.
Running 'slapcat -l file.ldif' also produces absolutely no output
whatsoever - and exits with a '0' status. I even fed slapcat the proper
'-f' and '-b' arguments, to no avail.
Is there a way to recover the data I imported into the database files?
Is there a way to get slapd to reindex stuff (BTW - slapindex didn't do
anything either - just immediately exited) or otherwise get slapd to
'understand' the data again? How can I avoid this in the future?
Pointers to anything I might not have read are more than welcome (except
for the damned faq-o-matic. I have no patience for that 'thing'). I've
looked on the mailing lists, man pages, and the O'Reilly LDAP book, but
found nothing.
+++++++++++++++ SNIP ++++++++++
daemon: activity on 1 descriptors
daemon: new connection on 10
ldap_pvt_gethostbyname_a: host=ldap.CS.Princeton.EDU, r=0
str2filter "(objectclass=*)"
put_filter: "(objectclass=*)"
put_filter: simple
put_simple_filter: "objectclass=*"
begin get_filter
PRESENT
ber_scanf fmt (m) ber:
ber_dump: buf=0x081e2c60 ptr=0x081e2c60 end=0x081e2c6d len=13
0000: 87 0b 6f 62 6a 65 63 74 63 6c 61 73 73 ..objectclass
end get_filter 0
daemon: added 10r
daemon: activity on:
daemon: select: listen=6 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: activity on: 10r
daemon: read activity on 10
connection_get(10)
connection_get(10): got connid=0
connection_read(10): checking for input on id=0
ber_get_next
ldap_read: want=8, got=8
0000: 30 0c 02 01 01 60 07 02 0....`..
ldap_read: want=6, got=6
0000: 01 03 04 00 80 00 ......
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x081e2950 ptr=0x081e2950 end=0x081e295c len=12
0000: 02 01 01 60 07 02 01 03 04 00 80 00 ...`........
do_bind
ber_get_next
ldap_read: want=8 error=Resource temporarily unavailable
ber_get_next on fd 10 failed errno=11 (Resource temporarily unavailable)
ber_scanf fmt ({imt) ber:
ber_dump: buf=0x081e2950 ptr=0x081e2953 end=0x081e295c len=9
0000: 60 07 02 01 03 04 00 80 00 `........
ber_scanf fmt (m}) ber:
ber_dump: buf=0x081e2950 ptr=0x081e295a end=0x081e295c len=2
0000: 00 00 ..
>>> dnPrettyNormal: <>
<<< dnPrettyNormal: <>, <>
do_bind: version=3 dn="" method=128
send_ldap_result: conn=0 op=0 p=3
send_ldap_result: err=0 matched="" text=""
send_ldap_response: msgid=1 tag=97 err=0
ber_flush: 14 bytes to sd 10
0000: 30 0c 02 01 01 61 07 0a 01 00 04 00 04 00 0....a........
ldap_write: want=14, written=14
0000: 30 0c 02 01 01 61 07 0a 01 00 04 00 04 00 0....a........
do_bind: v3 anonymous bind
daemon: select: listen=6 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: activity on: 10r
daemon: read activity on 10
connection_get(10)
connection_get(10): got connid=0
connection_read(10): checking for input on id=0
ber_get_next
ldap_read: want=8, got=8
0000: 30 3e 02 01 02 63 39 04 0>...c9.
ldap_read: want=56, got=56
0000: 19 64 63 3d 63 73 2c 64 63 3d 70 72 69 6e 63 65 .dc=cs,dc=prince
0010: 74 6f 6e 2c 64 63 3d 65 64 75 0a 01 02 0a 01 00 ton,dc=edu......
0020: 02 01 00 02 01 00 01 01 00 87 0b 6f 62 6a 65 63 ...........objec
0030: 74 63 6c 61 73 73 30 00 tclass0.
ber_get_next: tag 0x30 len 62 contents:
ber_dump: buf=0x081e3c90 ptr=0x081e3c90 end=0x081e3cce len=62
0000: 02 01 02 63 39 04 19 64 63 3d 63 73 2c 64 63 3d ...c9..dc=cs,dc=
0010: 70 72 69 6e 63 65 74 6f 6e 2c 64 63 3d 65 64 75 princeton,dc=edu
0020: 0a 01 02 0a 01 00 02 01 00 02 01 00 01 01 00 87 ................
0030: 0b 6f 62 6a 65 63 74 63 6c 61 73 73 30 00 .objectclass0.
ber_get_next
ldap_read: want=8 error=Resource temporarily unavailable
ber_get_next on fd 10 failed errno=11 (Resource temporarily unavailable)
do_search
ber_scanf fmt ({miiiib) ber:
ber_dump: buf=0x081e3c90 ptr=0x081e3c93 end=0x081e3cce len=59
0000: 63 39 04 19 64 63 3d 63 73 2c 64 63 3d 70 72 69 c9..dc=cs,dc=pri
0010: 6e 63 65 74 6f 6e 2c 64 63 3d 65 64 75 0a 01 02 nceton,dc=edu...
0020: 0a 01 00 02 01 00 02 01 00 01 01 00 87 0b 6f 62 ..............ob
0030: 6a 65 63 74 63 6c 61 73 73 30 00 jectclass0.
>>> dnPrettyNormal: <dc=cs,dc=princeton,dc=edu>
=> ldap_bv2dn(dc=cs,dc=princeton,dc=edu,0)
<= ldap_bv2dn(dc=cs,dc=princeton,dc=edu,0)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=cs,dc=princeton,dc=edu,272)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=cs,dc=princeton,dc=edu,272)=0
<<< dnPrettyNormal: <dc=cs,dc=princeton,dc=edu>, <dc=cs,dc=princeton,dc=edu>
SRCH "dc=cs,dc=princeton,dc=edu" 2 0 0 0 0
begin get_filter
PRESENT
ber_scanf fmt (m) ber:
ber_dump: buf=0x081e3c90 ptr=0x081e3cbf end=0x081e3cce len=15
0000: 87 0b 6f 62 6a 65 63 74 63 6c 61 73 73 30 00 ..objectclass0.
end get_filter 0
filter: (objectClass=*)
ber_scanf fmt ({M}}) ber:
ber_dump: buf=0x081e3c90 ptr=0x081e3ccc end=0x081e3cce len=2
0000: 00 00 ..
attrs:
=> bdb_back_search
bdb_dn2entry_rw("dc=cs,dc=princeton,dc=edu")
=> bdb_dn2id_matched( "dc=cs,dc=princeton,dc=edu" )
<= bdb_dn2id_matched: no match
send_ldap_result: conn=0 op=1 p=3
send_ldap_result: err=10 matched="" text=""
send_ldap_response: msgid=2 tag=101 err=32
ber_flush: 14 bytes to sd 10
0000: 30 0c 02 01 02 65 07 0a 01 20 04 00 04 00 0....e... ....
ldap_write: want=14, written=14
0000: 30 0c 02 01 02 65 07 0a 01 20 04 00 04 00 0....e... ....
daemon: select: listen=6 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: activity on: 10r
daemon: read activity on 10
connection_get(10)
connection_get(10): got connid=0
connection_read(10): checking for input on id=0
ber_get_next
ldap_read: want=8, got=7
0000: 30 05 02 01 03 42 00 0....B.
ber_get_next: tag 0x30 len 5 contents:
ber_dump: buf=0x081e3d68 ptr=0x081e3d68 end=0x081e3d6d len=5
0000: 02 01 03 42 00 ...B.
ber_get_next
ldap_read: want=8, got=0
ber_get_next on fd 10 failed errno=0 (Success)
connection_read(10): input error=-2 id=0, closing.
connection_closing: readying conn=0 sd=10 for close
connection_close: deferring conn=0 sd=10
do_unbind
connection_resched: attempting closing conn=0 sd=10
connection_close: conn=0 sd=10
daemon: removing 10
daemon: select: listen=6 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: select: listen=6 active_threads=0 tvp=NULL
+++++++++++++++ /SNIP +++++++++++++++
Thanks