Apple Event: May 7th at 7 am PT

Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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-OTHER, OS X Server

Posted on Jul 28, 2012 7:32 AM

Reply
37 replies

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 ?

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

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

Mac OS Server Open Directory Will Not Turn On

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.