[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Question about ODBC for SQL backend with OpenLdap
On Mon, 2006-06-12 at 21:55 +0200, Antoine Reveillon wrote:
> Thank you ver much for your answer ! You are my first reply !
Please reply to the list, don't reply personally to me, otherwise I'll
have to charge you for consultancy.
> Yes perhaps... But I think that the problem comes from the ODBC
> configuration... I let you see the file .log !
> Can you confirm you exactly loaded the
> test data as provided?
>
> Yes I did all the configuration writed in
> the /servers/slapd/rbmd/back-sql/README file ! And in the tables are
> the example data !
> backend_startup_one: starting "dc=example,dc=com"
>
> ==>backsql_db_open(): testing RDBMS connection
> backsql_db_open(): subtree search SQL condition not specified (use "subtree_cond" directive in
> slapd.conf)
> backsql_db_open(): setting "ldap_entries.dn LIKE concat('%',?)" as default
>
> backsql_db_open(): setting "ldap_entries.dn=?" as default
> backsql_db_open(): objectclass mapping SQL statement not specified (use "oc_query" directive in
> slapd.conf)
> backsql_db_open(): setting "SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings" by default
>
> backsql_db_open(): attribute mapping SQL statement not specified (use "at_query" directive in
> slapd.conf)
> backsql_db_open(): setting "SELECT name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return,sel_expr_u FROM ldap_attr_mappings WHERE oc_map_id=?" by default
>
> backsql_db_open(): entry insertion SQL statement not specified (use "insentry_stmt" directive in
> slapd.conf)
> backsql_db_open(): setting "INSERT INTO ldap_entries (dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)" by default
>
> backsql_db_open(): entry deletion SQL statement not specified (use "delentry_stmt" directive in
> slapd.conf)
> backsql_db_open(): setting "DELETE FROM ldap_entries WHERE id=?" by default
> backsql_db_open(): entry deletion SQL statement not specified (use "renentry_stmt" directive in
> slapd.conf)
>
> backsql_db_open(): setting "UPDATE ldap_entries SET dn=?,parent=?,keyval=? WHERE id=?" by default
> backsql_db_open(): objclasses deletion SQL statement not specified (use "delobjclasses_stmt" directive in
>
> slapd.conf)
> backsql_db_open(): setting "DELETE FROM ldap_entry_objclasses WHERE entry_id=?" by default
> ==>backsql_get_db_conn()
> ==>backsql_open_db_conn(4294967295)
> backsql_open_db_conn(4294967295): connected, adding to tree.
>
>
> <==backsql_open_db_conn(4294967295)
> backsql_get_db_conn(): first call -- reading schema map
> ==>backsql_load_schema_map()
> backsql_load_schema_map(): oc_query "SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings"
>
>
> backsql_load_schema_map(): at_query "SELECT name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return,sel_expr_u FROM ldap_attr_mappings WHERE oc_map_id=?"
> <==backsql_load_schema_map()
>
>
> <==backsql_get_db_conn()
> ==>backsql_free_db_conn()
> backsql_free_db_conn(): closing db connection 4294967295 (0x8214458)
> ==>backsql_close_db_conn(4294967295)
> <==backsql_close_db_conn(4294967295)
>
>
> <==backsql_free_db_conn()
> <==backsql_db_open(): test succeeded, schema map loaded
This clearly states that the configuration of back-sql was incomplete,
but sufficient to allow schema loading. As a consequence, if loading of
the schema from the database succeeded, I assume the ODBC is configured
correctly.
> slapd starting
> conn=0 fd=8 ACCEPT from IP=127.0.0.1:50034 (IP=
> 127.0.0.1:9011)
> connection_get(8)
> connection_get(8): got connid=0
> connection_read(8): 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 8 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
> conn=0 op=0 BIND 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 8
> conn=0 op=0 RESULT tag=97 err=0 text=
>
> do_bind: v3 anonymous bind
> connection_get(8)
>
> connection_get(8): got connid=0
> connection_read(8): checking for input on id=0
> ber_get_next
> ber_get_next: tag 0x30 len 37 contents:
> ber_get_next
> ber_get_next on fd 8 failed errno=11 (Resource temporarily unavailable)
>
>
> do_search
> ber_scanf fmt ({miiiib) ber:
> >>> dnPrettyNormal: <>
> <<< dnPrettyNormal: <>, <>
> SRCH "" 0 0 0 0 0
> ber_scanf fmt (m) ber:
> filter: (objectClass=*)
>
>
> ber_scanf fmt ({M}}) ber:
> attrs:
> conn=0 op=1 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
> => send_search_entry: conn 0 dn=""
> ber_flush: 50 bytes to sd 8
>
> <= send_search_entry: conn 0 exit.
>
> 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 8
>
> conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
>
> connection_get(8)
> connection_get(8): got connid=0
> connection_read(8): 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 8 failed errno=11 (Resource temporarily unavailable)
>
> do_unbind
> conn=0 op=2 UNBIND
> connection_closing: readying conn=0 sd=8 for close
> connection_resched: attempting closing conn=0 sd=8
>
> connection_close: conn=0 sd=8
> ==>backsql_connection_destroy()
>
> ==>backsql_free_db_conn()
> <==backsql_free_db_conn()
> <==backsql_connection_destroy()
> conn=0 fd=8 closed
> connection_get(8)
>
> connection_get(8): connection not used
> connection_read(8): no connection!
>
> conn=1 fd=8 ACCEPT from IP=127.0.0.1:50035
> (IP=127.0.0.1:9011)
> connection_get(8)
> connection_get(8): got connid=1
> connection_read(8): checking for input on id=1
>
>
> ber_get_next
> ber_get_next: tag 0x30 len 49 contents:
> ber_get_next
> ber_get_next on fd 8 failed errno=11 (Resource temporarily unavailable)
> do_bind
> ber_scanf fmt ({imt) ber:
> ber_scanf fmt (m}) ber:
>
>
> >>> dnPrettyNormal: <cn=Mitya Kovalev,dc=example,dc=com>
> => ldap_bv2dn(cn=Mitya Kovalev,dc=example,dc=com,0)
> <= ldap_bv2dn(cn=Mitya Kovalev,dc=example,dc=com)=0
> => ldap_dn2bv(272)
>
> <= ldap_dn2bv(cn=Mitya Kovalev,dc=example,dc=com)=0
>
> => ldap_dn2bv(272)
> <= ldap_dn2bv(cn=mitya kovalev,dc=example,dc=com)=0
> <<< dnPrettyNormal: <cn=Mitya Kovalev,dc=example,dc=com>, <cn=mitya kovalev,dc=example,dc=com>
>
> do_bind: version=3 dn="cn=Mitya Kovalev,dc=example,dc=com" method=128
>
> conn=1 op=0 BIND dn="cn=Mitya Kovalev,dc=example,dc=com" method=128
> ==>backsql_bind()
> ==>backsql_get_db_conn()
>
> ==>backsql_open_db_conn(1)
> backsql_open_db_conn(1): connected, adding to tree.
>
> <==backsql_open_db_conn(1)
> <==backsql_get_db_conn()
> ==>backsql_attrlist_add(): adding "userPassword" to list
>
> ==>backsql_attrlist_add(): attribute "userPassword" is in list
> ==>backsql_attrlist_add(): adding "objectClass" to list
>
> ==>backsql_dn2id("cn=mitya kovalev,dc=example,dc=com")
>
> backsql_dn2id("cn=mitya kovalev,dc=example,dc=com"): id_query "SELECT id,keyval,oc_map_id,dn FROM ldap_entries WHERE dn=?"
>
> <==backsql_dn2id("cn=mitya kovalev,dc=example,dc=com"): err=32
>
> backsql_bind(): could not retrieve bindDN ID - no such entry
This error clearly indicated that the search for the above DN in
ldap_entries failed. Do you see a row with that DN in ldap_entries?
> send_ldap_result: conn=1 op=0 p=3
> send_ldap_result: err=49 matched="" text=""
>
> send_ldap_response: msgid=1 tag=97 err=49
>
> ber_flush: 14 bytes to sd 8
> conn=1 op=0 RESULT tag=97 err=49 text=
All errors occurring during bind result in invalid credentials, to avoid
disclosing info about the database.
p.
Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati@sys-net.it
------------------------------------------