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

Re: OpenLDAP and MySQL



Thanks again for your help. It now fails at sql-test001-concurrency (sql-test000-read passes).

>>>>> Starting sql-test001-concurrency ...
running defines.sh
Starting slapd on TCP/IP port 9011...
Testing SQL backend concurrency...
Waiting 5 seconds for slapd to start...
Using ldapsearch to retrieve all the entries...
Filtering original ldif used to create database...
write test disabled for mysql; set SLAPD_USE_SQLWRITE=yes to enable
Using tester for concurrent server access...
PID=15745 - Search(50): base="dc=example,dc=com", filter="cn=Mitya Kovalev".
PID=15746 - Read(100): entry="documentTitle=book1,dc=example,dc=com".
PID=15747 - Search(50): base="cn=Akakiy Zinberstein,dc=example,dc=com", filter="sn=Zinberstein".
PID=15751 - Read(100): entry="dc=example,dc=com".
PID=15746 - Read done (0).
PID=15753 - Search(50): base="dc=example,dc=com", filter="cn=James*".
ldap_search: Can't contact LDAP server (-1)
PID=15745 - Search done (-1).
ldap_search: Can't contact LDAP server (-1)
PID=15747 - Search done (-1).
ldap_read: Can't contact LDAP server (-1)
PID=15751 - Read done (-1).
PID=15755 - Read(100): entry="cn=Akakiy Zinberstein,dc=example,dc=com".
ldap_bind: Can't contact LDAP server (-1)
PID=15756 - Search(50): base="dc=example,dc=com", filter="sn=*".
ldap_bind: Can't contact LDAP server (-1)
PID=15757 - Read(100): entry="ou=Referral,dc=example,dc=com".
ldap_bind: Can't contact LDAP server (-1)
stopping: child exited with status 1
./scripts/sql-test001-concurrency: line 94: 15730 Killed $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >$LOG1 2>&1
slapd-tester failed (1)!
./scripts/sql-test001-concurrency: line 99: kill: (15730) - No such process
>>>>> ./scripts/sql-test001-concurrency failed (exit 1)
make: *** [sql-yes] Error 1
root@rancid:~/ldapstuff/openldap-2.3.22/tests# ldap_search: Can't contact LDAP server (-1)
PID=15753 - Search done (-1).


and the last few bits from the log file are
Constructed query: SELECT DISTINCT ldap_entries.id,persons.id,'inetOrgPerson' AS objectClass,ldap_entries.dn AS dn FROM ldap_entries,persons WHERE persons.id=ldap_entries.keyval AND ldap_entries.oc_map_id=? AND ldap_entries.dn LIKE concat('%',?) AND (persons.surname='zinberstein')
id: '1'
(sub)dn: "%cn=akakiy zinberstein,dc=example,dc=com"
>>> dnPrettyNormal: <cn=Akakiy Zinberstein,dc=example,dc=com>
=> ldap_bv2dn(cn=Akakiy Zinberstein,dc=example,dc=com,0)
<= ldap_bv2dn(cn=Akakiy Zinberstein,dc=example,dc=com)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=Akakiy Zinberstein,dc=example,dc=com)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=akakiy zinberstein,dc=example,dc=com)=0
<<< dnPrettyNormal: <cn=Akakiy Zinberstein,dc=example,dc=com>, <cn=akakiy zinberstein,dc=example,dc=com>
backsql_oc_get_candidates(): added entry id=4, keyval=3 dn="cn=Akakiy Zinberstein,dc=example,dc=com"
<==backsql_oc_get_candidates(): 1
backsql_search(): loading data for entry id=4, oc_id=1, keyval=3
==>backsql_id2entry()
backsql_id2entry(): custom attribute list
==>backsql_get_attr_vals(): oc="inetOrgPerson" attr="cn" keyval=3
backsql_get_attr_vals(): number of values in query: 1
<==backsql_get_attr_vals()
==>backsql_get_attr_vals(): oc="inetOrgPerson" attr="sn" keyval=3
ldap_write: want=53, written=53
0000: 30 33 02 01 2c 73 2e 04 2c 6c 64 61 70 3a 2f 2f 03..,s..,ldap:// 0010: 6c 6f 63 61 6c 68 6f 73 74 3a 39 30 31 32 2f 64 localhost:9012/d 0020: 63 3d 65 78 61 6d 70 6c 65 2c 64 63 3d 63 6f 6d c=example,dc=com 0030: 3f 3f 73 75 62 ??sub conn=2 op=22 REF #0 "ldap://localhost:9012/dc=example,dc=com??sub";
<= send_search_reference
backsql_search(): loading data for entry id=1, oc_id=3, keyval=1
==>backsql_id2entry()
backsql_id2entry(): custom attribute list
backsql_id2entry(): attribute "cn" is not defined for objectlass "organization"
backsql_id2entry(): attribute "sn" is not defined for objectlass "organization"
==>backsql_get_attr_vals(): oc="organization" attr="objectClass" keyval=1




Aaron Richton wrote:
SLAPD_USE_SQL=mysql make sql
[...and then...]
>>>>> ./scripts/sql-test000-read failed (exit 1)

Fantastic! See http://www.openldap.org/faq/data/cache/1089.html

In particular, I'd try

SLAPD_USE_SQL='mysql' SLAPD_DEBUG='-1' make sql

wait for the apparently inevitable "failed", then look at the slapd.1.log
and/or ldapsearch.out and/or anything else that seems relevant.

Take the nastiest sounding messages -- sometimes these are the last few
messages -- and you can report back with them if the resolution isn't
obvious.