Hi all,
I am trying to get openldap working with a mysql backend. Unfortunately, I always get "ldap_search: No such object" when I try to query. I am not familiar with LDAP and I am trying to get a simple phone directory up and running from a very small existing DB. I can see from my mysql query log that slapd is working with the first entry from the ldap_entries table and then never requesting any subsequent rows. I'm not sure what information will be needed for debugging this, I have start with debug output from slapd taken when running a search.
Many thanks for any assistance,
Aaron
[root@test ~]# /usr/lib/mozldap/ldapsearch -x -b 'o=sql,c=RU' '(cn=*)'
ldap_search: No such object
/usr/sbin/slapd -d -1 -u ldap -h ldap:///
daemon: activity on 1 descriptor
daemon: activity on:
slap_listener_activate(8):
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 busy
>>> slap_listener(ldap:///)
daemon: activity on 1 descriptor
daemon: activity on:
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 active_threads=0 tvp=NULL
daemon: listen=8, new connection on 9
daemon: added 9r (active) listener=(nil)
daemon: activity on 1 descriptor
daemon: activity on:
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 active_threads=0 tvp=NULL
conn=0 fd=9 ACCEPT from IP=127.0.0.1:51444 (IP=0.0.0.0:389)
daemon: activity on 1 descriptor
daemon: activity on: 9r
daemon: read active on 9
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 active_threads=0 tvp=NULL
connection_get(9)
connection_get(9): got connid=0
connection_read(9): checking for input on id=0
ber_get_next
ldap_read: want=8, got=8
0000: 30 26 02 01 01 63 21 04 0&...c!.
ldap_read: want=32, got=32
0000: 0a 6f 3d 73 71 6c 2c 63 3d 52 55 0a 01 02 0a 01 .o=sql,c=RU.....
0010: 00 02 01 00 02 01 00 01 01 00 87 02 63 6e 30 00 ............cn0.
ber_get_next: tag 0x30 len 38 contents:
ber_dump: buf=0x96cb690 ptr=0x96cb690 end=0x96cb6b6 len=38
0000: 02 01 01 63 21 04 0a 6f 3d 73 71 6c 2c 63 3d 52 ...c!..o=sql,c=R
0010: 55 0a 01 02 0a 01 00 02 01 00 02 01 00 01 01 00 U...............
0020: 87 02 63 6e 30 00 ..cn0.
ber_get_next
ldap_read: want=8 error=Resource temporarily unavailable
daemon: activity on 1 descriptor
daemon: activity on:
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 active_threads=0 tvp=NULL
do_search
ber_scanf fmt ({miiiib) ber:
ber_dump: buf=0x96cb690 ptr=0x96cb693 end=0x96cb6b6 len=35
0000: 63 21 04 0a 6f 3d 73 71 6c 2c 63 3d 52 55 0a 01 c!..o=sql,c=RU..
0010: 02 0a 01 00 02 01 00 02 01 00 01 01 00 87 02 63 ...............c
0020: 6e 30 00 n0.
>>> dnPrettyNormal: <o=sql,c=RU>
=> ldap_bv2dn(o=sql,c=RU,0)
<= ldap_bv2dn(o=sql,c=RU)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(o=sql,c=RU)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(o=sql,c=ru)=0
<<< dnPrettyNormal: <o=sql,c=RU>, <o=sql,c=ru>
SRCH "o=sql,c=RU" 2 0 0 0 0
begin get_filter
PRESENT
ber_scanf fmt (m) ber:
ber_dump: buf=0x96cb690 ptr=0x96cb6b0 end=0x96cb6b6 len=6
0000: 87 02 63 6e 30 00 ..cn0.
end get_filter 0
filter: (cn=*)
ber_scanf fmt ({M}}) ber:
ber_dump: buf=0x96cb690 ptr=0x96cb6b4 end=0x96cb6b6 len=2
0000: 00 00 ..
attrs:
conn=0 op=0 SRCH base="o=sql,c=RU" scope=2 deref=0 filter="(cn=*)"
==> limits_get: conn=0 op=0 dn="[anonymous]"
==>backsql_search(): base="o=sql,c=ru", filter="(cn=*)", scope=2, deref=0, attrsonly=0, attributes to load: all
==>backsql_get_db_conn()
==>backsql_open_db_conn(0)
<==backsql_open_db_conn(0)
backsql_open_db_conn(0): connected, adding to tree.
<==backsql_get_db_conn()
==>backsql_dn2id("o=sql,c=ru") matched expected
backsql_dn2id("o=sql,c=ru"): id_query "SELECT id,keyval,oc_map_id,dn FROM ldap_entries WHERE dn LIKE CONCAT('%,',?)"
backsql_dn2id("o=sql,c=ru"): id=800 keyval=800 oc_id=1 dn=cn=Facsimile,o=sql,c=RU
>>> dnPrettyNormal: <cn=Facsimile,o=sql,c=RU>
=> ldap_bv2dn(cn=Facsimile,o=sql,c=RU,0)
<= ldap_bv2dn(cn=Facsimile,o=sql,c=RU)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=Facsimile,o=sql,c=RU)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=facsimile,o=sql,c=ru)=0
<<< dnPrettyNormal: <cn=Facsimile,o=sql,c=RU>, <cn=facsimile,o=sql,c=ru>
<==backsql_dn2id("o=sql,c=ru"): err=0
==>backsql_id2entry()
backsql_id2entry(): retrieving all attributes
==>backsql_get_attr_vals(): oc="person" attr="cn" keyval=800
backsql_get_attr_vals(): number of values in query: 1
<==backsql_get_attr_vals()
==>backsql_get_attr_vals(): oc="person" attr="sn" keyval=800
backsql_get_attr_vals(): number of values in query: 1
<==backsql_get_attr_vals()
==>backsql_get_attr_vals(): oc="person" attr="objectClass" keyval=800
backsql_get_attr_vals(): number of values in query: 1
<==backsql_get_attr_vals()
==>backsql_get_attr_vals(): oc="person" attr="telephoneNumber" keyval=800
backsql_get_attr_vals(): number of values in query: 1
<==backsql_get_attr_vals()
<==backsql_id2entry()
send_ldap_result: conn=0 op=0 p=3
send_ldap_result: err=32 matched="" text=""
send_ldap_response: msgid=1 tag=101 err=32
ber_flush: 14 bytes to sd 9
0000: 30 0c 02 01 01 65 07 0a 01 20 04 00 04 00 0....e... ....
daemon: activity on 1 descriptor
daemon: activity on: 9r
daemon: read active on 9
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 active_threads=0 tvp=NULL
connection_get(9)
ldap_write: want=14, written=14
0000: 30 0c 02 01 01 65 07 0a 01 20 04 00 04 00 0....e... ....
connection_get(9): got connid=0
connection_read(9): checking for input on id=0
ber_get_next
ldap_read: want=8, got=7
0000: 30 05 02 01 02 42 00 0....B.
ber_get_next: tag 0x30 len 5 contents:
ber_dump: buf=0x96ed058 ptr=0x96ed058 end=0x96ed05d len=5
0000: 02 01 02 42 00 ...B.
ber_get_next
ldap_read: want=8, got=0
ber_get_next on fd 9 failed errno=0 (Success)
connection_read(9): input error=-2 id=0, closing.
connection_closing: readying conn=0 sd=9 for close
daemon: activity on 1 descriptor
daemon: activity on:
daemon: epoll: listen=7 active_threads=0 tvp=NULL
daemon: epoll: listen=8 active_threads=0 tvp=NULL
connection_close: deferring conn=0 sd=9
do_unbind
conn=0 op=1 UNBIND
connection_resched: attempting closing conn=0 sd=9
connection_close: deferring conn=0 sd=9
conn=0 op=0 SEARCH RESULT tag=101 err=32 nentries=0 text=
<==backsql_search()
connection_resched: attempting closing conn=0 sd=9
connection_close: conn=0 sd=9
==>backsql_connection_destroy()
==>backsql_free_db_conn()
backsql_free_db_conn(): closing db connection 0 (0x96b8458)
==>backsql_close_db_conn(0)
<==backsql_close_db_conn(0)
<==backsql_free_db_conn()
<==backsql_connection_destroy()
daemon: removing 9
conn=0 fd=9 closed