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

Jan 15, 2012 11:06 AM in response to The Teknologist

root is by default enabled on OS X Server. It is the only account that can launch daemons running as another user which is mentioned in the plist file. Otherwise collabd won't run as _teamsserver which will generate other problems. And collabd was one of the first processes that would suffer from a failing postgres restart.


I'm quite sure the problem I've been facing is related to permissions but I've compared two systems bit by bit and can't find any differences.


The original system was installed with Lion Installer 10.7 and updated afterwards to 10.7.2. Maybe it is a library problem? I haven't compared them. It could be a timing issue as well as I sometimes had to reboot 4, 5, 6 times before postgres would even start again at boot time.


I've reinstalled the OS (Including server) using the 10.7.2 installer and this seems to have fixed the problem.

For the first time I've been able to issue the command serveradmin stop postgres followed by serveradmin start postgres without any problems. I did not wipe the partition but installed it over my boot volume. Copied all the data that was preserved in /Previous System back to assure the no mail, websites, agenda's etc were lost.

Also copied the old contents of /etc/ back. Will check the new /Library versus the saved one to see if I can spot anything.


launchctl works fine as well. I can load and unload services as root without problems.


The documentation of launchd is something I've read quite extensively. Unfortunate it doesn't provide me with any insights on how to troubleshoot it extensively.


Even though my system seems to be running fine now I've got to admit that I don't like to use the reinstall approach to solve problems if I don't know what I'm fixing.


Thank you sofar for your contributions.

Jan 18, 2012 2:39 PM in response to The Teknologist

Hi everyone,


Posting this in case it's useful to anyone.


I had a similar problem to that describe here: "error reading settings" when trying to look at the Wiki (and other) settings in Server.app.


My console log was full of:


1/18/12 2:26:51.418 PM org.postgresql.postgres: 2012-01-18 22:26:51 GMT FATAL: pre-existing shared memory block (key 0, ID 65536) is still in use

1/18/12 2:26:51.418 PM org.postgresql.postgres: 2012-01-18 22:26:51 GMT HINT: If you're sure there are no old server processes still running, remove the shared memory block or just delete the file "postmaster.pid".

1/18/12 2:26:51.418 PM com.apple.launchd: (org.postgresql.postgres[3602]) Exited with code: 1

1/18/12 2:26:51.418 PM com.apple.launchd: (org.postgresql.postgres) Throttling respawn: Will start in 10 seconds


So I followed the suggestion and did:

sudo rm -f /var/pgsql/postmaster.pid


That immediately appears to have addressed the problem, and it survives a reboot.

Feb 6, 2012 10:19 AM in response to Drizzt

I'm sorry to say that I'm still having this problem too...


Yesterday I had to reboot 9 times to get the services started...


Whenever this problem shows its face I can not issue a sudo launchctl load /System/Library/LaunchDaemons/com.apple.collabd.plist, but I can unload it.

Trying to load it (after unloading it first) will display the launchctl_msg() socket not connected error.


Can you please verify if this is the case on your system as well?

Feb 6, 2012 10:41 AM in response to Drizzt

Just on a flyer, has this happened after you update to 10.7.3 AND doing the Terminal "dsenableroot" procedure.


When Brian tried that, prior to 10.7.3 it allowed many more reboots without a problem. I would think that doing that rather large 10.7.3 update might force the dsenableroot process to reset things again since it is obvious that a goodly part of 10.7.3 involved changes to the directory utility code.


I do not have Lion Server (it has been requested but so far no response from those who have to fund it) so all I can offer is this as a suggestion to try.

Feb 8, 2012 6:45 AM in response to Brian Brumfield

Hello all,

I recently tried to set up OS-X Lion Server 10.7.3 on a mini mac server.

My (hopefully rather simple) goal is to implement the following services:


- DNS

- VPN

(-perhaps NTP)


OD

Calendar

AddressBook

FileSharing (for a start only group and user folders) with user data on server


I experienced the problems or symptoms You describe with 10.7.3. up to complete corruption

of the system. I have to clearly admit not being a professional in setting up those things.

Can You based upon Your experience suggest a setup or workaround that will possibly work?

I don't have a problem with starting with a fresh install, no vital data yet...

Further I don't mind working in the commandline or setting up some shell-scripts...


Kind regards and many thanks...

Feb 10, 2012 6:44 AM in response to The Teknologist

When I dug in and tried the dsenableroot after installing 10.7.3 I found that Apple changed the entire way enabling the Root account works. Now, you can enable Root from the Directory Utility repaated times BUT each time you try to enable it it now asks foir you to enter the Root password you will be using. This kind of adds Enable Root and Change Root password into one step. It no longer retains the Root password you had used previously.


All things considered, it looks like who ever tried to rebuild the Directory Utility for the Lion OS and its subsequent updates had better go back to school and this time they should stay awake in class so they can learn how to do it right! They still haven't figured out what to do to return the functionality that 10.6.8 and previous provided in this entire section of code.

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.