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

ldapsearch search failed



Dear All,

I am new to OpenLDAP area and really at the end of the rope trying to figure out this issue.

I just set up my OpenLDAP environment and imported a sample ldif file to populate the directory structure.
I tried to use ldapsearch utilty to see if OpenLDAP is functional but ran into some problems retriving entries
from OpenLDAP.

I used "slapcat" to dump bdb file to LDIF and I am confident that the entry I searched for does exist in the directory tree.
Unfortuntely, the slapd log keeps showing that bdb_search error 163 filter doens't match filter and return no result.
Am I missing something here?

I have attached some debugging info here for your perusal. Any help and feedback is highly appreciated.
Thanks a lot.

Peter

/*****************************************************************
	LDIF file of "dn: uid=staceyt, ou=People, dc=peter,dc=com"
******************************************************************
dn: uid=staceyt, ou=People, dc=peter,dc=com
cn: Stacey Yang
sn: Stacey
givenname: Staz
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: krb5Principal
objectclass: krb5KDCEntry
krb5PrincipalName: staceyt@peter.com
krb5KeyVersionNumber: 1
krb5MaxLife: 86400
krb5MaxRenew: 604800
krb5KDCFlags: 126
ou: Product Development
ou: People
l: Sunnyvale
uid: staceyt
mail: staceyt@peter.com
manager: uid=dmiller, ou=People, dc=peter,dc=com

/*****************************************************************
	ldapsearch utility command and response
******************************************************************
ldapsearch -x -b "dc=peter,dc=com" "uid=staceyt" mail
# extended LDIF
#
# LDAPv3
# base <dc=peter,dc=com> with scope sub
# filter: uid=staceyt
# requesting: mail
#

# search result
search: 2
result: 0 Success

# numResponses: 1


/*****************************************************************
	Slapd debugging mode
******************************************************************
@(#) $OpenLDAP: slapd 2.2.13 (Aug 19 2004 12:15:46) $
	petery@staz.peter.com:/home/petery/openldap-2.2.13/servers/slapd
daemon_init: <null>
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap:///)
daemon: initialized ldap:///
daemon_init: 1 listeners opened
slapd init: initiated server.
slap_sasl_init: initialized!
bdb_initialize: initialize BDB backend
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
bdb_initialize: initialize BDB backend
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)

slapd startup: initiated.
bdb_db_open: dc=peter,dc=com
bdb_db_open: dbenv_open(/usr/local/var/openldap-data)
slapd starting
ldap_pvt_gethostbyname_a: host=staz.peter.com, r=0
connection_get(9)
connection_get(9): got connid=0
connection_read(9): checking for input on id=0
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ber_get_next
ber_get_next on fd 9 failed errno=11 (Resource temporarily unavailable)
do_bind
ber_scanf fmt ({imt) ber:
ber_scanf fmt (m}) ber:
>>> 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 9
do_bind: v3 anonymous bind
connection_get(9)
connection_get(9): got connid=0
connection_read(9): checking for input on id=0
ber_get_next
ber_get_next: tag 0x30 len 61 contents:
ber_get_next
ber_get_next on fd 9 failed errno=11 (Resource temporarily unavailable)
do_search
ber_scanf fmt ({miiiib) ber:
>>> dnPrettyNormal: <dc=peter,dc=com>
=> ldap_bv2dn(dc=peter,dc=com,0)
<= ldap_bv2dn(dc=peter,dc=com,0)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=peter,dc=com,272)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=peter,dc=com,272)=0
<<< dnPrettyNormal: <dc=peter,dc=com>, <dc=peter,dc=com>
SRCH "dc=peter,dc=com" 2 0    0 0 0
ber_scanf fmt ({mm}) ber:
    filter: (uid=staceyt)
ber_scanf fmt ({M}}) ber:
    attrs: mail
==> limits_get: conn=0 op=1 dn="[anonymous]"
=> bdb_search
bdb_dn2entry("dc=peter,dc=com")
=> bdb_dn2id( "dc=peter,dc=com" )
<= bdb_dn2id: got id=0x00000001
entry_decode: "dc=peter,dc=com"
<= entry_decode(dc=peter,dc=com)
search_candidates: base="dc=peter,dc=com" (0x00000001) scope=2
=> bdb_dn2idl( "dc=peter,dc=com" )
=> bdb_equality_candidates (objectClass)
=> key_read
bdb_idl_fetch_key: [b49d1940]
<= bdb_index_read: failed (-30990)
<= bdb_equality_candidates: id=0, first=0, last=0
=> bdb_equality_candidates (uid)
=> key_read
bdb_idl_fetch_key: [02cc7f07]
<= bdb_index_read 1 candidates
<= bdb_equality_candidates: id=1, first=163, last=163
bdb_search_candidates: id=1 first=163 last=163
entry_decode: "uid=staceyt,ou=People,dc=peter,dc=com"
<= entry_decode(uid=staceyt,ou=People,dc=peter,dc=com)
=> bdb_dn2id( "ou=people,dc=peter,dc=com" )
<= bdb_dn2id: got id=0x00000005
=> bdb_dn2id( "uid=staceyt,ou=people,dc=peter,dc=com" )
<= bdb_dn2id: got id=0x000000a3
bdb_search: 163 does not match filter
send_ldap_result: conn=0 op=1 p=3
send_ldap_result: err=0 matched="" text=""
send_ldap_response: msgid=2 tag=101 err=0
ber_flush: 14 bytes to sd 9
connection_get(9)
connection_get(9): got connid=0
connection_read(9): checking for input on id=0
ber_get_next
ber_get_next: tag 0x30 len 5 contents:
ber_get_next
ber_get_next on fd 9 failed errno=11 (Resource temporarily unavailable)
do_unbind
connection_closing: readying conn=0 sd=9 for close
connection_resched: attempting closing conn=0 sd=9
connection_close: conn=0 sd=9
daemon: shutdown requested and initiated.
slapd shutdown: waiting for 0 threads to terminate
slapd shutdown: initiated
====> bdb_cache_release_all
slapd shutdown: freeing system resources.
slapd stopped.


TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.