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

first Previous Page 3 of 3
  • by KrawNET,

    KrawNET KrawNET May 21, 2015 7:37 PM in response to TheLostLibrary
    Level 1 (0 points)
    May 21, 2015 7:37 PM in response to TheLostLibrary

    best answer EVER!!!!  BLESS YOU!!!

  • by MarkyMarkQuebec,

    MarkyMarkQuebec MarkyMarkQuebec Jun 11, 2015 12:29 PM in response to TheLostLibrary
    Level 1 (0 points)
    Jun 11, 2015 12:29 PM in response to TheLostLibrary

    Open directory now starting just fine and all is good but I lost all my users in the process ? I did:

     

    sudo launchctl unload /System/LIbrary/LaunchDaemons/org.openldap.slapd.plist

    diskutil repairPermissions /

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

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

    sudo /usr/libexec/slapd -Tt

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

    sudo /usr/libexec/slapd -Tt

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



    Can I retrieve my users and profiles ?

  • by young.m,

    young.m young.m Jul 20, 2015 10:37 PM in response to francisfromhavertown
    Level 1 (0 points)
    Jul 20, 2015 10:37 PM in response to francisfromhavertown

    Don’t use launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist to stop/start LDAP server, use slapconfig -stopldapserver or -startldapserver instead.

     

    Don’t use diskutil repairPermissions / repair disk permissions where server.app is running on. It will mess up your server  permissions. diskutil repairPermissions / is only run on a systems without Server.app installed.

     

    -----

    sudo slapconfig -stopldapserver

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

    sudo /usr/libexec/slapd -Tt

    if error

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

    sudo /usr/libexec/slapd -Tt

    sudo slapconfig -startldapserver

  • by GSVNotInventedHere,

    GSVNotInventedHere GSVNotInventedHere Aug 27, 2015 12:43 AM in response to neocodesoftware
    Level 1 (0 points)
    Aug 27, 2015 12:43 AM in response to neocodesoftware

    To neocodesoftware:

     

    Thanks very much.

    This instruction set fixed my OD database after a Server and OS upgrade from:

    OS 10.10.3 -> 10.10.5

    Server 4.0.3 -> 4.1.5

    Aug 2015

  • by Currawong,

    Currawong Currawong Oct 20, 2015 3:42 AM in response to TheLostLibrary
    Level 1 (0 points)
    Oct 20, 2015 3:42 AM in response to TheLostLibrary

    Though "Repair permissions" doesn't exist in 10.11, this worked after cloning a server drive to a new drive caused Open Directory to screw up.

  • by gilbert,

    gilbert gilbert May 13, 2016 6:21 AM in response to neocodesoftware
    Level 1 (4 points)
    May 13, 2016 6:21 AM in response to neocodesoftware

    The recovering of the database did not work for me. So I replaced step 3 - step 6 by just restoring the whole database from a backup I did when configuring my server.

     

    so, instead of step 3 - step 6, try :

     

    sudo rm -rf /var/db/openldap

    sudo cp -pR /Volumes/YourBackupVolume/var/db/openldap  /var/db

     

    after doing this, step 7 & 8 went smoothly and everything worked again.

     

    gilbert

first Previous Page 3 of 3