Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

Open Directory Corruption after server shutdown

Hi,


After many years of intention, I finally got around to upgrading my server from 10.5 (Leopard) to 10.9.1 (Mavericks).


I kept putting it off because as you know once Apple moved onto Lion, ML & Mavericks, there was no migration path unless you were on at least Snow Leopard.


Anyway, that's irrelevant because I basically did a manual migration, starting off with a new server on Mavericks and manually re-created my user accounts and other services like DHCP, DNS etc. and used the awesome cyrus2dovecot script to move my mail over.


Over-all I'm very happy with my progress, everything seems to be working fine but I have had an odd problem occur a few times now!


When I first completed my migration and had everything working off my new Mavericks server, I did a restart and I had a indefinate Grey shutdown screen.

I forced the power off on the server (big mistake) and when I rebooted, I had lost my user accounts and I had all sorts of LDAP messages in my logs indicating a database corruption.


I tried all sorts of tips from internet research trying to repair the database but in the end the only option was to start over with Open Directory. That wasn't easy to figure out either because obviously Server.app doesn't provide any options other than start, stop and configure, none of which you can do with a corrupt OD anyway!


In the end I found out how to start over with the "slapconfig -destroyldapserver" command.


I was then able to re-create my users in Open Directory and this time I used the archive function immediately to create a backup of Open Directory.


I did assume this was a one off, caused by my idiotic behaviour of powering off the server, although that still bugged me as my 10.5 Leopard Server was never that tempormental!


What really concerns me though is I had to reboot my server yesterday after an update and the same thing happened!!

This time I did not power off the server, I had a prolonged grey screen but I left it alone and made a coffee. When I came back in, the server was off even though I could have sworn I did restart and not shutdown. Either way, I didn't force the power off but when I rebooted, I again had lost Open Directory!!


I didn't mess around with repair attempts this time, this server is now live, so I wanted to limit down-time. I destoryed OD again, which allowed me to re-enable OD and start over again (for a second time!?).

Thankfully, I was able to restore from my archive and not have to re-create all my users but I find it rather alarming that Mavericks is so tempormental with Open Directory.


I now fear shutting down my server ever!!


I'm wondering whether I should try to remeber to stop the Open Directory service before I ever do a server restart.

Posted on Jan 7, 2014 2:21 AM

Reply
Question marked as Best reply

Posted on Jan 7, 2014 2:51 AM

Ok, I found a few more people having issues with Open Directory corrupting for no reason like this one:


https://discussions.apple.com/thread/5287956?answerId=24414357022#24414357022


Alarmingly, these people had problems back in October, so some 4 months later, it appears Apple has a fairly catestophic bug in Mavericks server!!!


I suspect anyone reading this, it will be a little too late, but until this is addressed, PLEASE USE THE ARCHIVE OPTION FOR YOUR OPEN DIRECTORY !!


User uploaded file

10 replies
Question marked as Best reply

Jan 7, 2014 2:51 AM in response to healeydave

Ok, I found a few more people having issues with Open Directory corrupting for no reason like this one:


https://discussions.apple.com/thread/5287956?answerId=24414357022#24414357022


Alarmingly, these people had problems back in October, so some 4 months later, it appears Apple has a fairly catestophic bug in Mavericks server!!!


I suspect anyone reading this, it will be a little too late, but until this is addressed, PLEASE USE THE ARCHIVE OPTION FOR YOUR OPEN DIRECTORY !!


User uploaded file

Apr 18, 2014 5:57 AM in response to healeydave

i'm just ******. after so much time apple can't get solutions for this problem.... same thing here. after working 5 days to configure the server od shut down and never come back... sorry. i'm just ******...


WHY we use apple server?? (by the way, i'm apple-fan. i have every gadget of this wonderful company - but sorry...)


ps: i have read the post too late 🙂. no archive.

Jul 14, 2014 2:29 AM in response to healeydave

Hi healydave,


Just wondering if you managed to get this issue sorted as I'm having the same problem in 10.8.5 (ML Server). As you can see it's not just a Mavericks issue...


It's been bugging me for months & I can't seem to find the solution!!! I too fear shutting down every time any security updates come through.


Appreciate if you could share your experience since your post above.

Jul 14, 2014 7:20 PM in response to healeydave

I am building a new 10.9.4 Server. I have hand-entered 14 Users and four Groups, and supplied it with an old copy of the Users Home folders.


A few nights ago, I also thought it had crashed when the screen went gray at shutdown, and went through what you went through.


Last night I said shutdown and the screen went gray. I said a few swears, but I left it alone because I had something else to do on the other computer. Fully FIVE MINUTES later, it was finished its business and shut down "normally".


So my take away from that is, "It take FIVE MINUTES or more to shut down. Don't mess with it in that time period!"

Jul 15, 2014 8:26 AM in response to VocoMac

When you have time, you could read the console logs of a shutdown. They are copious, but mostly full of tasks that do not want to quit nicely.


Or sit there during a Restart and see if anything suspicious pops up on the screen (it does not seem to go through the white screen during Restart, but you need to have Verbose mode set to see the Terminal commands scroll by.)

Dec 30, 2015 11:49 PM in response to healeydave

In the mean time I'm using El Capitan (10.11.1) on my server and still have the same problem. However, when searching for a solution I found at least a workaround provided you use Time Machine to backup your server.


Time Machine creates a backup of your OD Database in /var/backups (not password protected!). By default you won't have permissions to see the content but with sudo you can view and copy the contents to another location. Next step is to delete the OD server (sudo slapconfig -destroyldapserver) and next to start OD again in Server. The first question will be whether you want to create a fresh OD server or restore from a backup copy. Point it to the backup you copied from /var/backups and you'll be back in business (at least this has worked for me on several occasions now with a simple server setup for home use).

Open Directory Corruption after server shutdown

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