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 7 of 8 last Next
  • by The Teknologist,

    The Teknologist The Teknologist Jul 5, 2012 9:19 AM in response to Drizzt
    Level 1 (15 points)
    Jul 5, 2012 9:19 AM in response to Drizzt

    Nope. I guess the post is too old and they take for granted it's never going to be solved !  ;-)

     

    Screen Shot 2012-07-05 at 18.18.06.PNG

  • by Drizzt,

    Drizzt Drizzt Jul 5, 2012 9:24 AM in response to The Teknologist
    Level 1 (19 points)
    Servers Enterprise
    Jul 5, 2012 9:24 AM in response to The Teknologist

    I can't seam to find a way to send you a PM...

    Contact me through my website : http://www.menzonet.org

     

    Bonjour de la belle province

  • by Uzilurcs,

    Uzilurcs Uzilurcs Jul 7, 2012 11:05 AM in response to Drizzt
    Level 1 (0 points)
    Jul 7, 2012 11:05 AM in response to Drizzt

    Thanks a lot for this Solution.

    This fix another Problem on my Server.

     

    http://pilif.github.com/2011/09/lion-password-server/

     

    You made my Day

  • by Cobber 99,

    Cobber 99 Cobber 99 Jul 13, 2012 11:33 PM in response to Drizzt
    Level 2 (245 points)
    Jul 13, 2012 11:33 PM in response to Drizzt

    When I attempt this command, I get:

     

    /etc/launchd.conf: Permission denied

     

    When I ls -la, the /etc directory does not have the file "launchd.conf" listed, so I'm confused as to how I can employ this fix (I have the same issues described here).  I'm running 10.7.4 Lion Server.

  • by Beno 44,

    Beno 44 Beno 44 Jul 13, 2012 11:43 PM in response to Cobber 99
    Level 1 (15 points)
    Jul 13, 2012 11:43 PM in response to Cobber 99

    try with sudo at the beginning

  • by Cobber 99,

    Cobber 99 Cobber 99 Jul 13, 2012 11:55 PM in response to Beno 44
    Level 2 (245 points)
    Jul 13, 2012 11:55 PM in response to Beno 44

    I did, and I enter my password (works for other sudo commands in the past), but unfortunatly that is the error I get.

  • by Drizzt,

    Drizzt Drizzt Jul 14, 2012 8:19 AM in response to Cobber 99
    Level 1 (19 points)
    Servers Enterprise
    Jul 14, 2012 8:19 AM in response to Cobber 99

    Than try to do this as root

     

    sudo su -

    echo .....

  • by Cobber 99,

    Cobber 99 Cobber 99 Jul 14, 2012 10:12 AM in response to Drizzt
    Level 2 (245 points)
    Jul 14, 2012 10:12 AM in response to Drizzt

    Double thanks to you Drizzt!  I've been terrified to restart either of my mini servers for the past year as I would never know what services would go down.  Often, sharepoints would only function for local users but not all my LDAP users and the "fix" was to take all services but File Sharing down, then restart, then turn on the other services and pray I didn't need a restart after.  I just finished restarting 4 times with all my services on, and my logs are now clean with stable services.  Apple had me re-install the OS, re-create my 89 user directory, blow out all ACLs and re-create ... so days of work that never fixed the underlying problem.  I have just finished submitting feedback to Apple on this.  I'm simultaneously elated at the fix you provided, and discusted that Apple hasn't supported enterprise for over a year now in this regard.  Thank you.

  • by ThomasSchulze,

    ThomasSchulze ThomasSchulze Jul 15, 2012 6:13 AM in response to Drizzt
    Level 1 (0 points)
    Jul 15, 2012 6:13 AM in response to Drizzt

    Hello Drizzt,

     

    many thanks from Germany. My server 10.7.4 ran without problems for a few months now. After

    playing around with NFS the described problem showed up ... and Your solutions just works fine for me!

    Now basic services run again.

     

    Thanks a lot, You saved me!

  • by davidh,

    davidh davidh Jul 15, 2012 9:17 AM in response to ThomasSchulze
    Level 4 (1,890 points)
    Jul 15, 2012 9:17 AM in response to ThomasSchulze

    What's very curious to me, is that on a completely stock 10.7.x server,

    when I list the Apple-default, existing limit for launchd, it says: unlimited

     

    launchctl limit maxfiles

              maxfiles    256            unlimited

     

    So the the suggested fix is raising the soft limit but throttling back the upper/hard "limit"

  • by Drizzt,

    Drizzt Drizzt Jul 15, 2012 11:13 AM in response to davidh
    Level 1 (19 points)
    Servers Enterprise
    Jul 15, 2012 11:13 AM in response to davidh

    the first number is per process, the second is OS wide.

  • by TRA2010,

    TRA2010 TRA2010 Jul 17, 2012 7:31 AM in response to Drizzt
    Level 1 (0 points)
    Jul 17, 2012 7:31 AM in response to Drizzt

    Interestingly on the 2 servers I had a look at, I cannot find the launchd.conf file in this dir. Once I run your command then it appears of course.

    Is this nornal that it does not exist or is there other info in the file that is now missing?

     

    Has anyone also found if this helps to make the server app more stable?

     

    In the past the only way to get services running again was to DISABLE "Dedicate System Resources to Server"

    but I have not tried re-enabling this since applying this command. Anyone tried it?

  • by Drizzt,

    Drizzt Drizzt Jul 17, 2012 2:20 PM in response to TRA2010
    Level 1 (19 points)
    Servers Enterprise
    Jul 17, 2012 2:20 PM in response to TRA2010

    The /etc/launchd.conf file doesn't exists on a default install.

     

    Everything about it is explained in the launchd.conf manual, which refers to the launchctl manual. If launchd.conf doesn't exists, launchd starts with it's default parameters set.

     

    The tests I did were with "Dedicate system resources" enabled. It does make server app more stable.

  • by TRA2010,

    TRA2010 TRA2010 Jul 18, 2012 12:20 AM in response to Drizzt
    Level 1 (0 points)
    Jul 18, 2012 12:20 AM in response to Drizzt

    Excellent, thanks for the clarification and for finding this solution.  Well done!!!

  • by Benezet,

    Benezet Benezet Jul 27, 2012 6:49 PM in response to TRA2010
    Level 1 (0 points)
    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.

first Previous Page 7 of 8 last Next