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 6 of 8 last Next
  • by pattieja1,

    pattieja1 pattieja1 Apr 30, 2012 2:32 PM in response to Benezet
    Level 1 (0 points)
    Apr 30, 2012 2:32 PM in response to Benezet

    Were you able to restore any users and settings for services from TimeMachine or did you have to start everything over from scratch too?

     

    If I'm able to restore a postgreSQL database dump and the openldap directory backup and then their home directories, I wouldn't mind giving this a try.

  • by Benezet,

    Benezet Benezet Apr 30, 2012 3:54 PM in response to pattieja1
    Level 1 (0 points)
    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.

  • by freudling,

    freudling freudling May 3, 2012 3:30 PM in response to Benezet
    Level 1 (0 points)
    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.

  • by rjankech,

    rjankech rjankech May 3, 2012 10:29 PM in response to freudling
    Level 1 (0 points)
    May 3, 2012 10:29 PM in response to freudling

    hi everyone,

    my problem with wiki and profile manager solved this link http://labs.hoffmanlabs.com/node/1787

  • by Kimbakat,

    Kimbakat Kimbakat Jun 26, 2012 11:14 AM in response to orsmo
    Level 1 (65 points)
    Jun 26, 2012 11:14 AM in response to orsmo

    When I do the WORKAROUND...

     

    after I "serveradmin start postgres"

     

    I get this

     

    postgres:error = "CANNOT_START_SERVICE_TIMEOUT_ERR"

  • by Drizzt,

    Drizzt Drizzt Jun 26, 2012 11:16 AM in response to The Teknologist
    Level 1 (19 points)
    Servers Enterprise
    Jun 26, 2012 11:16 AM in response to The Teknologist

    I'm trying this on my server :

    launchctl limit maxfiles 16384 32768

  • by Drizzt,

    Drizzt Drizzt Jul 3, 2012 12:44 PM in response to Drizzt
    Level 1 (19 points)
    Servers Enterprise
    Jul 3, 2012 12:44 PM in response to Drizzt

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

     

    Than reboot.

     

    It seams to solve my problems

  • by Teknologist,

    Teknologist Teknologist Jul 3, 2012 2:55 PM in response to Drizzt
    Level 1 (0 points)
    Jul 3, 2012 2:55 PM in response to Drizzt

    Congratulayions Drizzt!  after a year of people posting here , you nailed it !  finally!

     

    really! i have rebooted 3 times in a row and problems are gone ! even server admin works immediately ! no freeze, no services down !

     

    the bugs was random and only after a reboot! I am pretty su changing maxfiles fixed everything !

     

    thanks a million !

  • by Drizzt,

    Drizzt Drizzt Jul 3, 2012 5:13 PM in response to Teknologist
    Level 1 (19 points)
    Servers Enterprise
    Jul 3, 2012 5:13 PM in response to Teknologist

    Glad I could help!

    I've been working on this since september. There's a couple of bugs regarding this openned inside Apple. I hope a solution will come up regarding this bug

  • by orsmo,

    orsmo orsmo Jul 5, 2012 7:25 AM in response to Drizzt
    Level 1 (0 points)
    Jul 5, 2012 7:25 AM in response to Drizzt

    Out of curiosity, what led you to this, Drizzt?  I'm curious as to what specifically was going wrong and why this fixes it.

  • by Drizzt,

    Drizzt Drizzt Jul 5, 2012 8:31 AM in response to orsmo
    Level 1 (19 points)
    Servers Enterprise
    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.

  • by The Teknologist,

    The Teknologist The Teknologist Jul 5, 2012 8:52 AM in response to The Teknologist
    Level 1 (15 points)
    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:

     

     

     

     

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

  • by The Teknologist,

    The Teknologist The Teknologist Jul 5, 2012 8:57 AM in response to orsmo
    Level 1 (15 points)
    Jul 5, 2012 8:57 AM in response to orsmo

    By the way, I think you closed lots of long running discussions such as Profile Manager page is empty in server.app,  Device Manager not starting etc...  ;-)

     

    Does anybody know how to put the right answer inline in the first post ?

     

    I am the owner of this topic but can't seem to find any links/buttons to do that... duh...

  • by The Teknologist,

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

    And Drizzt, if you send me a PM with your paypalk email address I'll send you a beer !!   Thanks man !

    ;-)

  • by Drizzt,

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

    In my post, there should be a link saying "this solved my problem". Just click on it.

     

    I'd wait a week or two to be shure everything's running fine. I've been wrong before

first Previous Page 6 of 8 last Next