[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: bdb_dn2id: get failed: DB_NOTFOUND(resolved!!)
- To: Pierangelo Masarati <ando@sys-net.it>, Howard Chu <hyc@symas.com>
- Subject: Re: bdb_dn2id: get failed: DB_NOTFOUND(resolved!!)
- From: jay alvarez <ldapb0y@yahoo.com>
- Date: Thu, 9 Jun 2005 18:09:47 -0700 (PDT)
- Cc: jay alvarez <ldapb0y@yahoo.com>, openldap-software@OpenLDAP.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=sr3thX0PbEqf83wdgD+9lGyEUvSD4EJTrYZScrGO0qPyFCfmJ2JstNFJ/Ty3VVwhQRwrWMGWZXVwRuOXR757iqWidPuDQesIFJ3nePwJlpv0UV2Q8IWcW10sHSZYsTUMwLUEhnzVR9g/v+VB+YpM2Ye38PnSlk5ydNgjKoyoTOs= ;
- In-reply-to: <42A894AB.30103@sys-net.it>
--- Pierangelo Masarati <ando@sys-net.it> wrote:
> Howard Chu wrote:
>
> > Pierangelo Masarati wrote:
> >
> >> jay alvarez wrote:
> >>
> >>> Hi,
> >>>
> >>> I tried copying and pasting the example on quick
> start
> >>> guide. All of them, the slapd.conf,
> example.ldiff, and
> >>> yet after entering the ldap password 'secret':
> >>>
> >>> ldapadd -x -D "cn=Manager,dc=example,dc=com" -W
> -f
> >>> example.ldif
> >>>
> >>> I got this error:
> >>>
> >>> adding new entry "dc=example,dc=com "
> >>> ldap_add: Invalid syntax (21)
> >>> additional info: objectclass: value #0
> invalid
> >>> per syntax
> >>>
> >>>
> >>>
> >>> Here's the content of my ldiff:
> >>> dn: dc=example,dc=com
> >>> objectclass: dcObject
> >>> objectclass: organization
> >>> o: Example Company
> >>> dc: example
> >>>
> >>> dn: cn=Manager,dc=example,dc=com
> >>> objectclass: organizationalRole
> >>> cn: Manager
> >>>
> >>>
> >>>
> >>> Here's my slapd.conf:
> >>>
> >>> include
> /usr/local/openldap/etc/openldap/schema/core.schema
> >>> pidfile
> /usr/local/openldap/var/run/slapd.pid
> >>> argsfile
> /usr/local/openldap/var/run/slapd.args
> >>> access to * by * read
> >>> loglevel -1
> >>> backend bdb
> >>> database bdb
> >>> suffix "dc=example,dc=com"
> >>> rootdn "cn=Manager,dc=example,dc=com"
> >>> rootpw secret
> >>> directory /usr/local/openldap/var/openldap-data
> >>>
> >>>
> >>>
> >>> and here's a snippet of my /var/log/debug.log
> where I
> >>> got that Subject "bdb_dn2id", which I think
> might be
> >>> the portion where the error occured:
> >>>
> >>> Jun 9 18:04:07 gaheris slapd[1565]: daemon:
> select:
> >>> listen=7 active_threads=0 tvp=NULL
> >>> Jun 9 18:04:07 gaheris slapd[1565]: do_add
> >>> Jun 9 18:04:07 gaheris slapd[1565]: >>>
> >>> dnPrettyNormal: <dc=example,dc=com >
> >>> Jun 9 18:04:07 gaheris slapd[1565]: <<<
> >>> dnPrettyNormal: <dc=example,dc=com>,
> >>> <dc=example,dc=com>
> >>> Jun 9 18:04:07 gaheris slapd[1565]: do_add: dn
> >>> (dc=example,dc=com)
> >>> Jun 9 18:04:07 gaheris slapd[1565]: conn=8 op=1
> ADD
> >>> dn="dc=example,dc=com"
> >>> Jun 9 18:04:07 gaheris slapd[1565]:
> >>> bdb_dn2entry("dc=example,dc=com")
> >>> Jun 9 18:04:07 gaheris slapd[1565]: =>
> bdb_dn2id(
> >>> "dc=example,dc=com" )
> >>> Jun 9 18:04:07 gaheris slapd[1565]: <=
> bdb_dn2id: get
> >>> failed: DB_NOTFOUND: No matching key/data pair
> found
> >>> (-30989)
> >>> Jun 9 18:04:07 gaheris slapd[1565]:
> send_ldap_result:
> >>> conn=8 op=1 p=3
> >>> Jun 9 18:04:07 gaheris slapd[1565]:
> send_ldap_result:
> >>> err=21 matched="" text="objectclass: value #0
> invalid
> >>> per syntax"
> >>> Jun 9 18:04:07 gaheris slapd[1565]:
> >>> send_ldap_response: msgid=2 tag=105 err=21
> >>> Jun 9 18:04:07 gaheris slapd[1565]: conn=8 op=1
> >>> RESULT tag=105 err=21 text=objectclass: value #0
> >>> invalid per syntax
> >>> Jun 9 18:04:07 gaheris slapd[1565]: daemon:
> activity
> >>> on 1 descriptors
> >>> Jun 9 18:04:07 gaheris slapd[1565]: daemon:
> activity
> >>> on:
> >>>
> >>>
> >>
> >> likely it's a permissions problem on the
> directory/files of the
> >> database. What user did create them what user
> slapd is running as,
> >> what's the permissions on the files/directory?
> >>
> > No, there's no permissions error here. The
> bdb_dn2id failure is normal
> > for an Add operation - it is checking to see if
> the entry exists
> > before allowing it to be added. The "objectclass:
> value#0 invalid"
> > error message is the true error - his LDIF file
> has a trailing space
> > at the end of "dcObject".
>
> Right, I didn't realize the other message occurre
> because the database
> didn't exist, the suffix entry was being added.
>
> p.
>
>
>
> SysNet - via Dossi,8 27100 Pavia Tel:
> +390382573859 Fax: +390382476497
>
>
Hi everyone!
Thanks for replying. Anyway, I found out that the
cause of the error really is the trailing white spaces
at the end of my ldiff file. I won't forget this next
time. Thanks again!
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html