francisfromhavertown

Q: Mac OS Server Open Directory Will Not Turn On

Yesterday I got the server application for Mac OS Mountain Lion.  This is my first time working with apple server software and when I try to turn on Open Directory it says:

 

An Error occured on the server while processing a command.

The error occurred while processing a command of type 'setState' in plug-in 'servermgr_dirserv'.

 

I am not sure what is causing this.  I am running the server on a 2010 iMac with Mountain Lion installed and I couldn't find any answers online.  Any help would be much appriciated.

 

 

Edit:  I would be willing to reinstall the server software and reset settings for it if I have to.  (I just don't know how)

Mac OS Server, OS X Server

Posted on Jul 28, 2012 7:36 AM

Close

Q: Mac OS Server Open Directory Will Not Turn On

  • All replies
  • Helpful answers

Page 1 of 3 last Next
  • by DenisF,

    DenisF DenisF Jul 28, 2012 2:45 PM in response to francisfromhavertown
    Level 2 (150 points)
    Jul 28, 2012 2:45 PM in response to francisfromhavertown
  • by Michael Kennard2,

    Michael Kennard2 Michael Kennard2 Sep 3, 2012 10:47 PM in response to francisfromhavertown
    Level 1 (19 points)
    Sep 3, 2012 10:47 PM in response to francisfromhavertown

    My client just updated to 10.8.1 and lost the Open Directory with this error. Reverse DNS is working and changeip works.

  • by _Franck_,

    _Franck_ _Franck_ Oct 15, 2012 8:21 AM in response to francisfromhavertown
    Level 1 (0 points)
    Oct 15, 2012 8:21 AM in response to francisfromhavertown

    Check this to repair the database, it worked perfectly for me (yes 10.8.2 screwed the openldap db for me)

    http://www.prestonlee.com/2009/07/08/recovering-a-corrupt-openldap-database-on-o sx-server/

     

    1. check if this is the problem

    $ sudo /usr/libexec/slapd -Tt

    2. may be backup openldap db and try repairing

    $ sudo db_recover -h /var/db/openldap/openldap-data/

    3. check if things were repaired correctly

    $ sudo /usr/libexec/slapd -Tt

    4. restart the service

  • by Michael Kennard2,

    Michael Kennard2 Michael Kennard2 Oct 15, 2012 1:14 PM in response to _Franck_
    Level 1 (19 points)
    Oct 15, 2012 1:14 PM in response to _Franck_

    It worked. Phew. Thanks.

  • by Kevin Neal,

    Kevin Neal Kevin Neal Oct 15, 2012 2:03 PM in response to _Franck_
    Level 3 (513 points)
    Servers Enterprise
    Oct 15, 2012 2:03 PM in response to _Franck_

    sorry to hijack this post but when I try that command I get:

     

    507c79a9 ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={1}bdb.ldif"

    507c79a9 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable

     

    I have tried destroying the whole OD and starting again but I still get this, any ideas

  • by graced.info,

    graced.info graced.info Jan 8, 2013 8:05 PM in response to _Franck_
    Level 1 (0 points)
    Jan 8, 2013 8:05 PM in response to _Franck_

    Hello!

     

    $ sudo /usr/libexec/slapd -Tt

     

    gives

     

    50ecebcf olcDbDirectory: value #0: invalid path: No such file or directory

    50ecebcf config error processing olcDatabase={1}bdb,cn=config: olcDbDirectory: value #0: invalid path: No such file or directory

    slaptest: bad configuration file!

     

    Open Directory was the #1 reason I wanted to use the Server, and it's very disappointing that it stopped working only after a few days.

  • by _Franck_,

    _Franck_ _Franck_ Jan 8, 2013 11:44 PM in response to graced.info
    Level 1 (0 points)
    Jan 8, 2013 11:44 PM in response to graced.info

    juste did a quick google search on this, there's a lot of results and info

    did you try to repair disk permissions ?

     

    $ diskutil repairPermissions /

  • by graced.info,

    graced.info graced.info Jan 9, 2013 7:57 PM in response to _Franck_
    Level 1 (0 points)
    Jan 9, 2013 7:57 PM in response to _Franck_

    Thanks Frank,

     

    After the permission repair and sudo /usr/libexec/slapd -Tt this is what I see:

     

    50ee3ba8 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable

    50ee3ba8 bdb(cn=authdata): file id2entry.bdb has LSN 1/9422729, past end of log at 1/9068158

    50ee3ba8 bdb(cn=authdata): Commonly caused by moving a database from one database environment

    50ee3ba8 bdb(cn=authdata): to another without clearing the database LSNs, or by removing all of

    50ee3ba8 bdb(cn=authdata): the log files from a database environment

    50ee3ba8 bdb(cn=authdata): /var/db/openldap/authdata/id2entry.bdb: unexpected file type or format

    50ee3ba8 bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).

    50ee3ba8 backend_startup_one (type=bdb, suffix="cn=authdata"): bi_db_open failed! (22)

    slap_startup failed (test would succeed using the -u switch)

     

    I've googled my error messages, too, but only thing that came up for me was this thread, and nothing that I thought was very relevant...

  • by krw,

    krw krw Feb 18, 2013 8:10 AM in response to graced.info
    Level 2 (175 points)
    Feb 18, 2013 8:10 AM in response to graced.info

    Same issue here:

     

    truffula:~ admin$ sudo /usr/libexec/slapd -Tt

    51225150 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable

    51225150 bdb(cn=authdata): file id2entry.bdb has LSN 15/5271406, past end of log at 15/4833906

    51225150 bdb(cn=authdata): Commonly caused by moving a database from one database environment

    51225150 bdb(cn=authdata): to another without clearing the database LSNs, or by removing all of

    51225150 bdb(cn=authdata): the log files from a database environment

    51225150 bdb(cn=authdata): /var/db/openldap/authdata/id2entry.bdb: unexpected file type or format

    51225150 bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).

    51225150 backend_startup_one (type=bdb, suffix="cn=authdata"): bi_db_open failed! (22)

    slap_startup failed (test would succeed using the -u switch)

  • by salomo,

    salomo salomo Feb 25, 2013 6:37 AM in response to krw
    Level 1 (0 points)
    Feb 25, 2013 6:37 AM in response to krw

    I also have the same issue. Did anybody find a solution?

  • by neocodesoftware,Helpful

    neocodesoftware neocodesoftware Jun 6, 2013 11:42 AM in response to _Franck_
    Level 1 (16 points)
    Jun 6, 2013 11:42 AM in response to _Franck_

    Thanks _Franck_!

     

    I had to do a few more steps than and modify the recover command based on info from Case #2 - http://www.iredmail.org/forum/topic3694-iredmail-support-power-cut-ldap-dont-sta rt.html

     

    1. check if this is the problem

    $ sudo /usr/libexec/slapd -Tt

    >> bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).

    2. Stop LDAP on OD Master

    $ sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist

    3. Repair Permissions

    $ diskutil repairPermissions /

    4. backup openldap db

    $ sudo cp /var/db/openldap/authdata/id2entry.bdb /var/db/openldap/authdata/id2entry.bdb.backup

    5. repair

    $ sudo db_recover -cv -h /var/db/openldap/openldap-data/

    >> Recovery complete at Thu Jun  6 11:01:35 2013

    >> Maximum transaction ID 8000060e Recovery checkpoint [2][6589846]

    6. run repair again to check

    $ sudo db_recover -cv -h /var/db/openldap/openldap-data/

    >> Finding last valid log LSN: file: 2 offset 6589938

    >> Recovery starting from [1][28]

    >> Recovery complete at Thu Jun  6 11:02:32 2013

    >> Maximum transaction ID 8000060e Recovery checkpoint [2][6589938]

    7. double check if things were repaired correctly

    $ sudo /usr/libexec/slapd -Tt

    >> bdb_monitor_db_open: monitoring disabled; configure monitor database to enable

    config file testing succeeded

    8. restart the service

    $ sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist

  • by BMcWhirt,

    BMcWhirt BMcWhirt Jul 25, 2013 6:20 AM in response to neocodesoftware
    Level 1 (0 points)
    Jul 25, 2013 6:20 AM in response to neocodesoftware

    neocodesoftware,

     

    This worked great!  Saved my but as I corrupted the db trying to get a FreeBSD Samba server to authentacate. For some reason even timemachien wasnt fixing the problem but this did.

     

    Thanks.

  • by neocodesoftware,

    neocodesoftware neocodesoftware Jul 25, 2013 6:30 AM in response to BMcWhirt
    Level 1 (16 points)
    Jul 25, 2013 6:30 AM in response to BMcWhirt

    Awesome! Glad it worked for you too!

  • by S-N-Y,

    S-N-Y S-N-Y Sep 24, 2013 9:11 AM in response to francisfromhavertown
    Level 1 (0 points)
    Sep 24, 2013 9:11 AM in response to francisfromhavertown

    I have the same Problem, i try the 8. steps of neocodesoftware from above, but they doesn't help me.

    The command:

    sudo /usr/libexec/slapd -Tt 

    always show this Error: 

    bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22)


    Then after the step 7. from neocodesoftware i also repaired the openldap/auth-data with this repair command:

     

    sudo db_recover -cv -h /var/db/openldap/authdata/

     

    then i restart the service with step 8. from above

    sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist

     

    and now my Open Directory came back to Live

Page 1 of 3 last Next