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

Open Directory setState error

Hi,


I had an Open Directory system working fine, rebooted my (Mac Mini 2011) server and now it refuses to start. I get:


"An error occurred on the server while processing a command. The error occurred while processing a command of type 'setState' in plug-in 'servermgr_dirserv'"


I had this error before on an old installation of OS X which I have since reinstalled.


What's going on? Open Directory seems to me to be completely and utterly unstable, and not fit for purpose. All of a sudden it's stopped working and therefore I can't login using my normal username and password. What gives?!

Mac mini, OS X Mountain Lion (10.8.2)

Posted on Sep 30, 2012 11:38 AM

Reply
8 replies

Sep 30, 2012 11:49 AM in response to studentguy

Looking at the logs I'm getting these errors:


root@b1026.apple.com:/private/var/tmp/OpenLDAP/OpenLDAP-208.1~6/servers/slapd

Sep 30 19:48:32 woz.private slapd[1629]: slap_add_listener: opened additional listener 'ldaps:///'

Sep 30 19:48:32 woz.private slapd[1629]: bdb(dc=woz,dc=private): file id2entry.bdb has LSN 1/1837404, past end of log at 1/1693634

Sep 30 19:48:32 woz.private slapd[1629]: bdb(dc=woz,dc=private): Commonly caused by moving a database from one database environment

Sep 30 19:48:32 woz.private slapd[1629]: bdb(dc=woz,dc=private): to another without clearing the database LSNs, or by removing all of

Sep 30 19:48:32 woz.private slapd[1629]: bdb(dc=woz,dc=private): the log files from a database environment

Sep 30 19:48:32 woz.private slapd[1629]: bdb(dc=woz,dc=private): /var/db/openldap/openldap-data/id2entry.bdb: unexpected file type or format

Sep 30 19:48:32 woz.private slapd[1629]: bdb_db_open: database "dc=woz,dc=private": db_open(/var/db/openldap/openldap-data/id2entry.bdb) failed: Invalid argument (22).

Sep 30 19:48:32 woz.private slapd[1629]: backend_startup_one (type=bdb, suffix="dc=woz,dc=private"): bi_db_open failed! (22)

Sep 30 19:48:32 woz.private slapd[1629]: bdb_db_close: database "dc=woz,dc=private": alock_close failed

Sep 30 19:48:32 woz.private slapd[1629]: slapd stopped.

Sep 30, 2012 12:08 PM in response to Mark23

Hi,


Not a static IP directly, it's set to DCHP but the DCHP server is set to always assign it the same address.


I only have on OD server, so yes this is the master. I use time machine so I do have backups, I just tried copying the /var/db/openldap folder from a time machine backup, and no dice.


Results of the terminal command:


woz:~ admin$ sudo changeip -checkhostname

Password:



Primary address = 10.0.1.10



Current HostName = woz.private

DNS HostName = woz.private



The names match. There is nothing to change.

dirserv:success = "success"

Oct 2, 2012 6:06 AM in response to Mark23

Hi Mark,


Thanks for the reply.


If that's the case why has it been working fine for a couple of months? I don't see why a .private server won't work, obviously it won't work offsite unless you have a mobile account, but that's fine for me. If it won't work, why does server.app allow me to set this up like this?


How should it be setup then?


This doesn't seem to be the issue though, as it seems that the DB has become corrupted? That's not a DNS issue surely?

Open Directory setState error

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