The Teknologist

Q: 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.

Screen Shot 2011-07-25 at 3.39.57 AM.PNG

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

Close

Q: For all of you having services failing to start

  • All replies
  • Helpful answers

first Previous Page 4 of 8 last Next
  • by Brian Brumfield,

    Brian Brumfield Brian Brumfield Jan 16, 2012 2:50 PM in response to Joe Pyrdek
    Level 1 (130 points)
    Jan 16, 2012 2:50 PM in response to Joe Pyrdek

    Joe -

     

    I took a look at this, and my root account was disabled. I enabled it, and have rebooted a number of times (including one full system crash) and there have been no hiccups with postgres.

     

    It may be too early to tell, but I have never restarted this many times without problems.

     

    Hmmmm. You may have stumbled onto something!

  • by Marco V,

    Marco V Marco V Jan 18, 2012 2:05 AM in response to The Teknologist
    Level 1 (0 points)
    Jan 18, 2012 2:05 AM in response to The Teknologist

    Today Apple confirmed that their is an issue with lauchd. Bug 10676168 describes the launchmsg() socket not connected problem. Launchd is used by many commands, including serveradmin, apachectl etc.

     

    Let's hope that they will release an update soon.

  • by Sylvan,

    Sylvan Sylvan Jan 18, 2012 2:39 PM in response to The Teknologist
    Level 2 (240 points)
    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.

  • by Drizzt,

    Drizzt Drizzt Feb 6, 2012 8:42 AM in response to Marco V
    Level 1 (19 points)
    Servers Enterprise
    Feb 6, 2012 8:42 AM in response to Marco V

    10.7.3 as been release since. I hoped it solved the problem, but the problem came back today. Are you guys having it too?

  • by Marco V,

    Marco V Marco V Feb 6, 2012 10:19 AM in response to Drizzt
    Level 1 (0 points)
    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?

  • by Drizzt,

    Drizzt Drizzt Feb 6, 2012 10:31 AM in response to Marco V
    Level 1 (19 points)
    Servers Enterprise
    Feb 6, 2012 10:31 AM in response to Marco V

    The problem happens with any service. In my case, I created scripts that do several jobs automaticly for me. I tried unloading and reloading one and got the launch_mgs socket problem.

  • by Joe Pyrdek,

    Joe Pyrdek Joe Pyrdek Feb 6, 2012 10:41 AM in response to Drizzt
    Level 2 (155 points)
    Mac OS X
    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.

  • by Drizzt,

    Drizzt Drizzt Feb 6, 2012 10:49 AM in response to Joe Pyrdek
    Level 1 (19 points)
    Servers Enterprise
    Feb 6, 2012 10:49 AM in response to Joe Pyrdek

    I just ran dsenableroot as.. root.. and rebooted. Let's see where it takes us

     

    My next idea is to clear as single user /private/tmp and /private/var/tmp and recreate them.

  • by Brian Brumfield,

    Brian Brumfield Brian Brumfield Feb 6, 2012 10:52 AM in response to Drizzt
    Level 1 (130 points)
    Feb 6, 2012 10:52 AM in response to Drizzt

    Me too. Thanks for the reminder Joe. Best of luck!

  • by ThomasSchulze,

    ThomasSchulze ThomasSchulze Feb 8, 2012 6:45 AM in response to Brian Brumfield
    Level 1 (0 points)
    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...

  • by Drizzt,

    Drizzt Drizzt Feb 10, 2012 6:14 AM in response to Drizzt
    Level 1 (19 points)
    Servers Enterprise
    Feb 10, 2012 6:14 AM in response to Drizzt

    dsenableroot didn't solve the problem, it came back yesterday night

  • by Joe Pyrdek,

    Joe Pyrdek Joe Pyrdek Feb 10, 2012 6:44 AM in response to The Teknologist
    Level 2 (155 points)
    Mac OS X
    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. 

  • by Drizzt,

    Drizzt Drizzt Feb 10, 2012 9:17 AM in response to Drizzt
    Level 1 (19 points)
    Servers Enterprise
    Feb 10, 2012 9:17 AM in response to Drizzt

    I just went in single user mode. I did a fsck, everything was fine. I than emptied /tmp and /var/tmp, and rebooted. The machine kernel panicked on the reboot. The server is now reindexing via Spotlight (don't know why).

     

    We will see in 3 or 4 days if it changed something...

  • by Drizzt,

    Drizzt Drizzt Feb 13, 2012 12:45 PM in response to Drizzt
    Level 1 (19 points)
    Servers Enterprise
    Feb 13, 2012 12:45 PM in response to Drizzt

    It haven't changed a thing.

    I tried reenabling "Reserve ressources for Server" and rebooted, problem came back 3 days later.

  • by ThomasSchulze,

    ThomasSchulze ThomasSchulze Feb 13, 2012 10:52 PM in response to Drizzt
    Level 1 (0 points)
    Feb 13, 2012 10:52 PM in response to Drizzt

    Hello all,

     

    after having had serious trouble with 10.7.3 on a mac min server (mid 2011),

    I reinstalled and started new with everything as standard as possible.

    Up to now (>5 days) everything seems to run fine, I use the following:

    - DNS

    - OpenDirectory

     

    - Calendar

    - Addressbook

    - Wiki

    - FileSharing (of course)

     

    I don't habe "Reserve resources for Server" activated.

     

    In my previous case I used the two drives in a raid1... perhaps this was a root cause for some problems I had.

     

    Perhaps this helps You?

     

    Kind regards,

     

    Thomas

first Previous Page 4 of 8 last Next