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

RE: OpenLDAP 2.07 + UnixODBC



Thank you.  I'm now able to compile and run slapd.  On to a new problem! :-)

When I run slapd with my slapd.conf as follows, I get an error in my debug
log.

include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
database sql
suffix "o=sql, c=RU"
rootpw secret
dbname ldap
dbuser ldap
dbpassword ldap
subtree_cond "ldap_entries.dn LIKE '%'+?"


this is what i get when I run /usr/local/libexec/slapd -d 5

@(#) $OpenLDAP: slapd 2.0.7-Release (Thu Nov 30 13:19:37 PST 2000) $
        root@test:/root/openldap-2.0.7/servers/slapd
daemon_init: <null>
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
ldap_url_parse(ldap:///)
daemon: socket() failed errno=22 (Invalid argument)
daemon: initialized ldap:///
daemon_init: 1 listeners opened
slapd init: initiated server.
==>backsql_initialize()
<==backsql_initialize()
==>backsql_db_init()
==>backsql_db_config()
<==backsql_db_config(): dbname=ldap
==>backsql_db_config()
<==backsql_db_config(): dbuser=ldap
==>backsql_db_config()
<==backsql_db_config(): dbpasswd=ldap
==>backsql_db_config()
<==backsql_db_config(): subtree_cond=ldap_entries.dn LIKE '%'+?
slapd startup: initiated.
==>backsql_db_open(): testing RDBMS connection
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_r
eturn FROM ldap_attr_mappings WHERE oc_map_id=?' by default
backsql_db_open(): entry insertion SQL statement not specified (use
insentry_query 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_query directive in slapd.conf)
backsql_db_open(): setting 'DELETE FROM ldap_entries WHERE id=?' by default
==>backsql_get_db_conn()
==>backsql_open_db_conn()
backsql_open_db_conn(): connected, adding to tree
<==backsql_open_db_conn()
backsql_get_db_conn(): first call -- reading schema map
==>load_schema_map()
load_schema_map(): error preparing at_query: 'SELECT
name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_r
eturn FROM ldap_attr_mappings WHERE oc_map_id=?'
Return code: -1
<==backsql_get_db_conn()
==>backsql_free_db_conn()
backsql_free_db_conn(): closing db connection
==>backsql_close_db_conn()
<==backsql_close_db_conn()
<==backsql_free_db_conn()
backsql_db_open(): test failed, schema map not loaded - exiting
backend_startup: bi_db_open 0 failed!
slapd shutdown: initiated
==>backsql_db_close()
<==backsql_db_close()
slapd shutdown: freeing system resources.
==>backsql_db_destroy()
==>backsql_free_db_env()
<==backsql_free_db_env()
==>destroy_schema_map()
<==destroy_schema_map()
<==backsql_db_destroy()
slapd stopped.
connections_destroy: nothing to destroy.


I'm guessing that the problem lies in the 7th line where I get the "socket()
failed errno=22" message, but I can't imagine why.  Thanks in advance for
any assistance.

Sean Johnson
IT Manager
PinnacleOne
225 Broadway, Suite 2200
San Diego, CA 92101
ph# (619)230-0336
fax (619)230-0613

> -----Original Message-----
> From: daniel [mailto:daniel]On Behalf Of Daniel Ceregatti
> Sent: Thursday, November 30, 2000 9:46 AM
> To: sjohnson@sandiego.pinnacleone.com
> Subject: Re: OpenLDAP 2.07 + UnixODBC
>
>
> Make sure /usr/local/lib is in ld.so.conf. If not, add it, and
> run ldconfig.
>
> If that doesn't work, make sure libodbc.so is in /usr/local/lib
> (or some other directory in your $LD_LIBRARY_PATH) with ldconfig
> -v | grep libodbc. If it can't find it, copy it into
> /usr/local/lib manually and run ldconfig again.
>
> Hope this helps.
>
> Daniel
>
> Sean Johnson wrote:
>
> > I can't seem to get OpenLDAP and unixODBC to cooperate on a
> virgin RedHat6.2
> > machine I'm testing on.  I'm hoping somebody has been through
> this and can
> > provide me with some insight.  Apparently I'm missing something
> somewhere.
> > Here is what I have done so far:
> >
> > 1. virgin RH 6.2 install
> > 2. install unixodbc driver manager tarball (configure, make,
> make install --
> > nothing special)
> > 3. install inline TDS driver in /usr/local/lib
> > 4. configure odbc.ini and odbcinst.ini in /etc
> > 5. test (with success) unixodbc install using isql utility to
> connect to my
> > MS sql server
> > 6. unzip/tar openldap tarball
> > 7. search/replace occurrences of -liodbc with -lodbc in configure
> > 8. configure --enable-sql, make depend, make, make test
> >
> > make test fails with the following:
> >
> > cd tests; make test
> > make[1]: Entering directory `/root/openldap-2.0.7/tests'
> > Initiating LDAP tests for LDBM...
> > >>>>> Executing all LDAP tests...
> > >>>>> Test Directory: .
> > >>>>> Backend: ldbm
> > >>>>> Starting test000-rootdse ...
> > running defines.sh . ldbm
> > Datadir is ./data
> > Cleaning up in ./test-db...
> > Starting slapd on TCP/IP port 9009...
> > Using ldapsearch to retrieve all the entries...
> > Waiting 5 seconds for slapd to start...
> > Waiting 5 seconds for slapd to start...
> > Waiting 5 seconds for slapd to start...
> > Waiting 5 seconds for slapd to start...
> > Waiting 5 seconds for slapd to start...
> > Waiting 5 seconds for slapd to start...
> > kill: (25742) - No such pid
> > ldap_bind: Can't contact LDAP server
> > >>>>> Test failed
> > >>>>> ./scripts/test000-rootdse failed (exit 1)
> > make[1]: *** [test-ldbm] Error 1
> > make[1]: Leaving directory `/root/openldap-2.0.7/tests'
> > make: *** [test] Error 2
> >
> > If I continue on anyways and do
> >
> > 9. make install
> > 10. copy slapd.conf from
> source/servers/slapd/back-sql/rdms_depend/mssql/ to
> > /usr/local/etc/openldap/
> > 11. edit slapd.conf to get default schemas from
> > /usr/local/etc/openldap/schema
> > 12. edit slapd.conf to use correct
> user/password/server/database on my MS
> > sql server
> > 13. /usr/local/libexec/slapd -d 5
> >
> > I get this:
> >
> > ./slapd: error in loading shared libraries: libodbc.so.1:
> cannot open shared
> > object file: No such file or directory
> >
> > If anyone has been through this or knows what my problem may be, I'd
> > appreciate your response.  Thanks.
> >
> > Sean Johnson
> > IT Manager
> > PinnacleOne
> > 225 Broadway, Suite 2200
> > San Diego, CA 92101
> > ph# (619)230-0336
> > fax (619)230-0613
>
> --
>
> Daniel Ceregatti
>
> Systems and Technology Manager
> Kick Media Corporation
> (310)280-5421
> (310)280-5440 Fax
>
>