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

For all of you having services failing to start

After 48 hours of struggle with this same issue and 6 clean re-installs of Lion Server I have found the bug in Lion Server causing all ruby based collaboration services (Device Manager, Wiki, ical, some adress book features ie: major screw up in services around server admin tools and server app). The most visible one is in Profile Manager because as you all pointed out it even says sometimes "Error Reading Settings". And if you take a look at the logs its even worst...full of errors...


that's how I found out, yes reading all the logs took time:


Basically they all fail because they use Postgresql database.


At first I did 2 clean re-installs and noticed everytime, after having spent some time configuring the server (open directory/kerneros, creating accounts/mailboxes, profiles etc.). I would do a reboot and everything would break.


Now I won't go over all the diggin I did but I finally manage to understand why Postgres at some point was failing.


it seems there is a bug.


If you turn "Dedicate Resources to Server Services" in the Server.app Hardware Section (next to Push Notifications switch", postgres doesn't start and all depending services (lots) fail.


The Solution: Just turn that OFF as shown below and restart. Everything should get back in order. If you still see some "push_notify: not connected" erros in you console logs (it happened to me even thoug all servcies were restored) the solution is easy. Hit change and redo the setup with you appleid. You'll be issued new certs by Apple and everything shoudl work fine.

User uploaded file

That's all.


Hope this helps the many people that are frustrated like I was. Now that everything works, it's the perfect server for a mini Cloud. You'll love Profile Manager for provisioning payload to your devices. Elegant, efficient and simple, yet very flexible with the openDirectory backend.


Cheers everyone !


Eric


twitter: @teknologism

Mac OS X (10.7)

Posted on Jul 24, 2011 7:17 PM

Reply
119 replies

Apr 29, 2012 9:21 AM in response to Benezet

After seven months, I finally received an answer from Apple Enterprise Escalation Support Engineering. I don't know if this applies to everyone, but there were several undocumented fixes in 10.7.3 that were not mentioned in the release notes regarding Time Machine and PostgeSQL that ultimately resolved the issue for me.


According to Apple: 10.7.3 specifically resolves an issue with Time Machine backup, where PostgreSQL databases could become unusable because of an issue with backup and automatic recovery of Postgre data


Unfortunately to see the benefit I had to reinstall the system software. I had reinstalled the system software so many times before, that I resorted to using a boot disk created according to the methods described by MacWorld, et. al. to save time. If you run and upload an EDC to Apple they can tell how the system software was installed. As such they consider this an unsupported method and really are resistant to helping you until you re-install via a supported method. Having to reinstall the system software for a server implementation is really the nuclear option but I was willing to give it one more try. To make sure everything was supported, I had the techs at the Genius Bar install 10.7.3 from an image at the Apple Store. It was great in that it only took about 5 minutes to install versus the several hour process at home given the speed of my Internet connection. I'm happy to report that for the first time since October 2011 Lion Server is running flawlessly. It's been a week and so far and all my services come up as expected even after 5-6 reboots.

Apr 30, 2012 3:54 PM in response to pattieja1

I restored only data that was not tied to postgreSQL (iCal, AddressBook, Wiki, etc.) Before wiping the server, I copied all my user home directories to another volume, archived Open Directory, exported my settings from Server Admin, exported calendars and contacts as *.ics files (not archives) and *.vcf files. After Apple reinstalled the system software, I loaded Server back on. I restored Open Directory from the archive, imported saved server settings, reset the path to home directories in Workgroup Manager (I did have to fix persmissions on these folders) and imported calendar items and contacts. I did not restore anything from Time Machine because I didn't need to. I also re-installed from scratch any 3rd party apps on the server. 10.7.3 now makes it easy to choose a location for service data similar to how it was back in SL Server which made it very easy to copy mail directories to the new location.

May 3, 2012 3:30 PM in response to Benezet

My wiki services is down again. I remember on the phone with Apple Support last week that he asked if I had installed Lion Server as an after option: if my machine shipped with client Lion only. So for the record, I have a Mac Mini non-server version. Is this a pattern? I got the impression that those units that shipped with clean installs of Lion Server are less buggy and crash prone.

Jul 5, 2012 8:31 AM in response to orsmo

Deactivating Device Manager made the server stable again.

The errors I got playing with launchctl said socket not connected. A socket is an open file.

Searching on the web, I learned that launchd had limits independent of the kernel. It seams to apply these limits to itself. With Device Manager openned, lsof tels me that launchd has more than 256 files openned, which is more than the default limit of open files.


This fix is to change the limit of the number of openned files per process and make it higher.

Jul 5, 2012 8:52 AM in response to The Teknologist

Solved by Drizzt on Jul 3rd 2012 (moreless a year later and 4 OSX Lion incremental releases that didn't fix anything):


My rant @ Apple:


Honestly I wouldn't even call it a bug. It's more a misconfiguration of the OS by Apple, knowing what services they are supposed to offer on this kind of server.


Can you imagine I have spent a year crossing finger every time I had to reboot the mac mini server ? Really ?


Really, I think it's very embarassing for Apple to not have fixed this ridiculous config problem for a year and after 10.7.1, 10.7.2, 10.7.3 and 10.7.4. Result of all this, is as an IT Architect/Consultant, I am frequently advising on solutions for customers and I would never recommend OSX as a server in a corporate or important environement, I am not even talking critical, just a workable environment (practically nothing other than home enthusiast).


Shameful knowing the base (BSD/Unix) is a rock solid platform for serious servers nowadays. At least they achieved a big goal, rendering an über-stable and widely deployed server OS base (BSD/Unix) completely broken...


This config/bug problem may be solved but have you guys figuredf how clumsy and slow/freezing are both GUI Admin apps , (Server.app and ServerAdminTools) ???


Kudos to Apple for deserting enterprise software...



Answer below:



Drizzt



sudo echo "limit maxfiles 10240 120000">/etc/launchd.conf


Than reboot.


It seams to solve my problems 🙂



PS: Sorry but I can't even seem to put this answer inline in the first post I initiated a year ago...

For all of you having services failing to start

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