Apple Event: May 7th at 7 am PT

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

Jul 27, 2012 6:49 PM in response to TRA2010

A day after upgrading to ML server I started getting all sorts of weirdness which several reboots did not resolve. I couldn't even troubleshoot as the logs would not load in Server.app and Console.app would just hang requiring a force quit. I couldn't believe these issues were happening again as the upgrade ran seamless and all services were working perfectly. I ran Drizzt's solution figuring if it worked for Lion it just might work for Mountain Lion. I ran the command and viola, everything came back up with no issues.

Jul 29, 2012 6:05 PM in response to Drizzt

When I do sudo launchctl load -w /System/Library/LaunchDaemons/org.postgresql.postgres.plist

I get: org.postgresql.postgres: Already loaded


So if I do:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.postgresql.postgres.plist

sudo launchctl load -w /System/Library/LaunchDaemons/org.postgresql.postgres.plist

But no postgres process start.


Profile Manager and Wiki says "Error Reading Settings" in Server.app and the log keeps looping through the messages below:


7/29/12 9:02:55.607 PM com.apple.devicemanager: DEBUG: Initializing DeviceManagerDaemon with ports 3320,3321,3322,3323,3324,3325,3326,3327,3328,3329 (physmem = 16GB)

7/29/12 9:02:55.607 PM com.apple.devicemanager: DEBUG: Making sure Rails is configured properly

7/29/12 9:02:55.607 PM com.apple.devicemanager: DEBUG: Running rake command: /usr/bin/rake db:migrate

7/29/12 9:02:57.354 PM com.apple.devicemanager: rake aborted!

7/29/12 9:02:57.354 PM com.apple.devicemanager: could not connect to server: No such file or directory

7/29/12 9:02:57.354 PM com.apple.devicemanager: Is the server running locally and accepting

7/29/12 9:02:57.354 PM com.apple.devicemanager: connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

7/29/12 9:02:57.354 PM com.apple.devicemanager: (See full trace by running task with --trace)

7/29/12 9:02:57.361 PM com.apple.devicemanager: (in /usr/share/devicemgr/backend)

7/29/12 9:02:57.365 PM com.apple.devicemanager: /usr/share/devicemgr/backend/devicemgrd:109:in `rake': Rake command failed with 256 (RuntimeError)

7/29/12 9:02:57.365 PM com.apple.devicemanager: from /usr/share/devicemgr/backend/devicemgrd:103:in `setupRails'

7/29/12 9:02:57.365 PM com.apple.devicemanager: from /usr/share/devicemgr/backend/devicemgrd:33:in `run'

7/29/12 9:02:57.365 PM com.apple.devicemanager: from /usr/share/devicemgr/backend/devicemgrd:131

7/29/12 9:02:57.365 PM com.apple.launchd: (com.apple.devicemanager[665]) Exited with code: 1

7/29/12 9:02:57.365 PM com.apple.launchd: (com.apple.devicemanager) Throttling respawn: Will start in 9 seconds

7/29/12 9:03:04.318 PM com.apple.launchd: (org.postgresql.postgres[668]) Exited with code: 1

7/29/12 9:03:04.318 PM com.apple.launchd: (org.postgresql.postgres) Throttling respawn: Will start in 10 seconds

Jul 29, 2012 6:32 PM in response to sevkoms

This line :

com.apple.launchd: (org.postgresql.postgres) Throttling respawn: Will start in 10 seconds


Means that Postgres stops. You can have a look in /Library/Logs/PostgreSQL/PostgreSQL.log ans see why it stoped. Since you start it by yourself, could it be that you left it openned? Once launchd can start it for good, you'll be fine.

Aug 28, 2012 7:13 PM in response to Drizzt

Oh - my - god. Drizzt you are a hero, truly, king of kings. I have been regretting moving to Lion server as every week something goes wrong, and I have to restart the server.


Just out of interest, what exactly is that doing does postgresql have a limit of users or something?


So when even I set up a server, I should just run this terminal command straight away!


Has anyone submitted this to Apple? Perhaps this will happen in 10.7.5?

Sep 6, 2012 5:48 PM in response to paulfromburwood

Oh for a bit more info:


Out of the blue, no one can connect to the server, Mail, Calender, Address Book all spit an error, that the password is incorrcet (so it seems like the password server is falling over).


I have to restart to get it back. Once restarted, Mail Address Book work great. iCal does not.


So I have to open terminal and do the following:


sudo serveradmin stop calendar

sudo serveradmin settings calendar:Authentication:Wiki:URL = "http://127.0.0.1:8089/RPC2"

sudo serveradmin start calendar


Then it all comes good.

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.