Menu

help please ! object class violation

Help
AxelE
2000-07-19
2000-07-20
  • AxelE

    AxelE - 2000-07-19

    hi,

    I've installed the ldap-abook and it's running. At 1st I got an error while creating a new entry. (I've not added a directory entry.)

    now i tried to add a directory entry -as shown in in the posting of  (rrr) by using:
    ldapadd -d9 -D "cn=Manager, o=abook" -W < first.ldif

    it seems to work.

    next step: i try to add an enty by using the same line as above (2nd.ldif)
    result: object class violation.

    the contents of my first.ldif:

    dn: o=abook
    cn: abook
    objectclass: organization

    the contents of my 2nd.ldif:

    dn: cn=David Leigh, o=abook
    cn: David Leigh
    sn: Leigh
    givenname: David

    the contents of my ldap.conf:

    BASE    dc=abook
    HOST    linux.hh.de

    the contents of my sladp.conf:

    include        /etc/openldap/slapd.at.conf
    include        /etc/openldap/slapd.oc.conf
    schemacheck    on
    #referral    ldap://root.openldap.org/

    pidfile        /var/run/slapd.pid
    argsfile    /var/run/slapd.args

    ##################################################################
    # ldbm database definitions
    ##################################################################
    database    ldbm
    suffix        "o=abook"
    rootdn        "cn=Manager, o=abook"
    rootpw        secret
    # cleartext passwords, especially for the rootdn, should
    # be avoid.  See slapd.conf(5) for details.
    directory    /home/ldap/abook
    index        cn

    the abook-interface shows the following error, when someone tries to add an entry:
    the server cannot find an object specified in the request From Abook at line: 208

    please, could you help me? it is very important for me to get this running.

    I'm siiting here for 3 days now I don't know how to find my mistake.

    thanks and excuse my english please.

     
    • David Leigh

      David Leigh - 2000-07-19

      The problem with the error on the ldapadd is that you need to specify an objectclass in your 2nd ldif file.  ie:

      dn: cn=David Leigh,o=abook    <-- watch out for the extra space around the comma.
      cn: David Leigh
      sn: Leigh
      givenname: David
      objectclass: abookPerson       <-- missing line

      Unfortunately, the reason you're getting the error in the cgi is not so obvious.  Have you added the abookPerson
      objectclass definition to your slapd.oc.conf?

      One thing you could try is to temporarily turn off schema checking in your slapd.conf.  If the ldap-abook starts
      working, that will tell you that the problem is definately in your schema.

       
      • AxelE

        AxelE - 2000-07-20

        thank you for your answer,

        it's not working:

        here is the output of ldapadd with the first.ldiff:

        ldap_init
        ldap_bind_s
        ldap_simple_bind_s
        ldap_simple_bind
        ldap_send_initial_request
        open_ldap_connection
        ldap_connect_to_host: linux.hh.de:389
        sd 3 connected to: 192.168.255.2
        ldap_delayed_open successful, ld_host is (null)
        ldap_send_server_request
        ber_flush: 39 bytes to sd 3
             0  % 02 01 01  ` 20 02 01 02 04 13  c  n  =  M
             a  n  a  g  e  r  , 20  o  =  a  b  o  o  k 80
            06  s  e  c  r  e  t
        ldap_result
        wait4msg (infinite timeout)
        ** Connections:
        * host: linux.hh.de  port: 389  (default)
          refcnt: 2  status: Connected
          last used: Thu Jul 20 16:03:30 2000

        ** Outstanding Requests:
        * msgid 1,  origid 1, status InProgress
           outstanding referrals 0, parent count 0
        ** Response Queue:
           Empty
        do_ldap_select
        read1msg
        ber_get_next
        ber_get_next: tag 0x30 len 12 contents:
        ber_dump: buf 0x8056940, ptr 0x8056940, end 0x805694c
                  current len 12, contents:
            02 01 01  a 07 0a 01 00 04 00 04 00
        got result msgid 1, original id 1
        new result:  res_errno: 0, res_error: <>, res_matched: <>
        read1msg:  0 new referrals
        request 1 done
        res_errno: 0, res_error: <>, res_matched: <>
        ldap_free_request (origid 1, msgid 1)
        ldap_free_connection
        ldap_free_connection: refcnt 1
        ldap_result2error
        ldap_msgfree
        ldap_add
        ldap_send_initial_request
        ldap_send_server_request
        ber_flush: 64 bytes to sd 3
             0  > 02 01 02  h  9 04 07  o  =  a  b  o  o  k
             0  .  0 0d 04 02  c  n  1 07 04 05  a  b  o  o
             k  0 1d 04 0b  o  b  j  e  c  t  c  l  a  s  s
             1 0e 04 0c  o  r  g  a  n  i  z  a  t  i  o  n
            (end)
        ldap_result
        wait4msg (infinite timeout)
        ** Connections:
        * host: linux.hh.de  port: 389  (default)
          refcnt: 2  status: Connected
          last used: Thu Jul 20 16:03:30 2000

        ** Outstanding Requests:
        * msgid 2,  origid 2, status InProgress
           outstanding referrals 0, parent count 0
        ** Response Queue:
           Empty
        do_ldap_select
        read1msg
        ber_get_next
        ber_get_next: tag 0x30 len 12 contents:
        ber_dump: buf 0x8055968, ptr 0x8055968, end 0x8055974
                  current len 12, contents:
            02 01 02  i 07 0a 01 00 04 00 04 00
        got result msgid 2, original id 2
        new result:  res_errno: 0, res_error: <>, res_matched: <>
        read1msg:  0 new referrals
        request 2 done
        res_errno: 0, res_error: <>, res_matched: <>
        ldap_free_request (origid 2, msgid 2)
        ldap_free_connection
        ldap_free_connection: refcnt 1
        ldap_result2error
        ldap_msgfree
        ldap_unbind
        ldap_free_connection
        ldap_send_unbind
        ber_flush: 7 bytes to sd 3
             0 05 02 01 03  B 00
        ldap_free_connection: actually freed
        adding new entry o=abook
        ============================================================
        here is the output of ldapadd with the 2nd.ldiff:

        ldap_init
        ldap_bind_s
        ldap_simple_bind_s
        ldap_simple_bind
        ldap_send_initial_request
        open_ldap_connection
        ldap_connect_to_host: linux.hh.de:389
        sd 3 connected to: 192.168.255.2
        ldap_delayed_open successful, ld_host is (null)
        ldap_send_server_request
        ber_flush: 39 bytes to sd 3
             0  % 02 01 01  ` 20 02 01 02 04 13  c  n  =  M
             a  n  a  g  e  r  , 20  o  =  a  b  o  o  k 80
            06  s  e  c  r  e  t
        ldap_result
        wait4msg (infinite timeout)
        ** Connections:
        * host: linux.hh.de  port: 389  (default)
          refcnt: 2  status: Connected
          last used: Thu Jul 20 16:03:40 2000

        ** Outstanding Requests:
        * msgid 1,  origid 1, status InProgress
           outstanding referrals 0, parent count 0
        ** Response Queue:
           Empty
        do_ldap_select
        read1msg
        ber_get_next
        ber_get_next: tag 0x30 len 12 contents:
        ber_dump: buf 0x8056940, ptr 0x8056940, end 0x805694c
                  current len 12, contents:
            02 01 01  a 07 0a 01 00 04 00 04 00
        got result msgid 1, original id 1
        new result:  res_errno: 0, res_error: <>, res_matched: <>
        read1msg:  0 new referrals
        request 1 done
        res_errno: 0, res_error: <>, res_matched: <>
        ldap_free_request (origid 1, msgid 1)
        ldap_free_connection
        ldap_free_connection: refcnt 1
        ldap_result2error
        ldap_msgfree
        ldap_add
        ldap_send_initial_request
        ldap_send_server_request
        ber_flush: 122 bytes to sd 3
             0  x 02 01 02  h  s 04 17  c  n  =  D  a  v  i
             d 20  L  e  i  g  h  , 20  o  =  a  b  o  o  k
             0  X  0 13 04 02  c  n  1 0d 04 0b  D  a  v  i
             d 20  L  e  i  g  h  0 0d 04 02  s  n  1 07 04
            05  L  e  i  g  h  0 14 04 09  g  i  v  e  n  n
             a  m  e  1 07 04 05  D  a  v  i  d  0 1c 04 0b
             o  b  j  e  c  t  c  l  a  s  s  1 0d 04 0b  a
             b  o  o  k  P  e  r  s  o  n
        ldap_result
        wait4msg (infinite timeout)
        ** Connections:
        * host: linux.hh.de  port: 389  (default)
          refcnt: 2  status: Connected
          last used: Thu Jul 20 16:03:40 2000

        ** Outstanding Requests:
        * msgid 2,  origid 2, status InProgress
           outstanding referrals 0, parent count 0
        ** Response Queue:
           Empty
        do_ldap_select
        read1msg
        ber_get_next
        ber_get_next: tag 0x30 len 12 contents:
        ber_dump: buf 0x8055a30, ptr 0x8055a30, end 0x8055a3c
                  current len 12, contents:
            02 01 02  i 07 0a 01 00 04 00 04 00
        got result msgid 2, original id 2
        new result:  res_errno: 0, res_error: <>, res_matched: <>
        read1msg:  0 new referrals
        request 2 done
        res_errno: 0, res_error: <>, res_matched: <>
        ldap_free_request (origid 2, msgid 2)
        ldap_free_connection
        ldap_free_connection: refcnt 1
        ldap_result2error
        ldap_msgfree
        ldap_unbind
        ldap_free_connection
        ldap_send_unbind
        ber_flush: 7 bytes to sd 3
             0 05 02 01 03  B 00
        ldap_free_connection: actually freed
        adding new entry cn=David Leigh, o=abook
        ============================================================
        I have an entry in the slapd.oc.conf about the objectclass abookPerson

        (it is the default slapd.oc.conf, included in your ldap-abook, just copied)

        output of ldapsearch:

        ldap_search: No such object
        ldap_init( <default>, 0 )
        filter pattern: objectclass=*
        returning: ALL
        filter is: (objectclass=*)
        0 matches

        ============================================================

        thanks for your help, hoping we can get it running ?

         
        • David Leigh

          David Leigh - 2000-07-20

          So the output of "ldapsearch -L -b "o=abook" "objectclass=*" is an empty list?
          What do you get when you do "ldbmcat /home/ldap/abook/id2entry.dbb"?

           
          • AxelE

            AxelE - 2000-07-20

            that's the prolem I don't understand.

            I can't give you the output of the ldbmcat command now, because I'm away of my computer untill next week, but I had a look at the created *.dbb -files in the current directory (hex-listing) and the data's were into these files. That's why I can understand that there's no output by ldbmsearch.

            I will post you the output, when I'm back.

            Do you have other ideas to solve my problem / to find my mistake?

            Thanx a lot.

             

Log in to post a comment.