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 5 of 8 last Next
  • by Ocean Digital,

    Ocean Digital Ocean Digital Feb 14, 2012 10:32 AM in response to ThomasSchulze
    Level 1 (4 points)
    iPhone
    Feb 14, 2012 10:32 AM in response to ThomasSchulze

    I had installed 10.7 Server with the hope of setting up a home server.  For many reasons, I have downgraded to SL and dropped the idea of my own server.

     

    Just thought you all would want to know,  I think unless you are doing this for business, just stay away from Lion and its Server altogether and life will be much easier again.

     

    I plan on testing out a Linux package to run inside a VM for my home server use and will probably never go back to a Mac server.  What's the point unless you run a network with only Apple devices?

  • by Drizzt,

    Drizzt Drizzt Feb 23, 2012 8:32 AM in response to The Teknologist
    Level 1 (19 points)
    Servers Enterprise
    Feb 23, 2012 8:32 AM in response to The Teknologist

    Something new...

     

    I noticed in the logs devicemgr having problems writing it's pid file in /var/run/devicemgr. Thing is, the folder didn't exist. I created it with the right permissions.

     

    drwxr-xr-x  12 _devicemgr  _devicemgr   408B Feb 21 17:30 devicemgr

     

    Than, I switched "reserve ressources" off, rebooted, stopped all services, did a "serveradmin stop" on all services to be shure (including serveradmin stop postgres), rebooted and restarted all services.

     

    Tomorrow night/this weekend I'll be fixed on if it solved my problem.

  • by Bobby & Carie,

    Bobby & Carie Bobby & Carie Mar 1, 2012 10:06 PM in response to The Teknologist
    Level 1 (0 points)
    Mar 1, 2012 10:06 PM in response to The Teknologist

    Sadly amazing - this is a 'known' issue in the community for 8 months, and Apple hasn't found a fix yet. I'm disheartend. Working on a fresh install myself.  I even went as far as a TimeMachine restore, from pre-install.

     

    I was testing on my own machine before rolling out to a few clients and upselling for Apple over Linux.  Not about to put my reputation on the line for this version of Server.  Sorry guys - it's about as reliable as a drunk clown.

     

    C'mon Tim - Steve would have jumped in a long time ago to get this fixed. You can do better.

  • by Drizzt,

    Drizzt Drizzt Mar 13, 2012 4:39 AM in response to The Teknologist
    Level 1 (19 points)
    Servers Enterprise
    Mar 13, 2012 4:39 AM in response to The Teknologist

    I think I've got a solution! I've got a week of uptime and everything's running good.

     

    As root :

     

    cp /var/db/dyld/dyld_shared_cache_i386 /var/db/dyld/dyld_shared_cache_x86_64 /var/run/

    update_dyld_shared_cache -force

     

    I just don't know if the problem comes back after a reboot, since I didn't reboot after that

  • by dylanharris,

    dylanharris dylanharris Mar 15, 2012 10:08 PM in response to Drizzt
    Level 1 (0 points)
    Mar 15, 2012 10:08 PM in response to Drizzt

    Didn't work for me, unfortunately.

  • by Drizzt,

    Drizzt Drizzt Mar 16, 2012 6:12 AM in response to dylanharris
    Level 1 (19 points)
    Servers Enterprise
    Mar 16, 2012 6:12 AM in response to dylanharris

    Problem came back after a reboot. Someone suggested a safe boot to solve the problem

    http://support.apple.com/kb/HT1564

  • by dylanharris,

    dylanharris dylanharris Mar 21, 2012 11:26 AM in response to Drizzt
    Level 1 (0 points)
    Mar 21, 2012 11:26 AM in response to Drizzt

    I've got things working for the time being with safe reboot, a permissions fix, & a reboot back into normal usage. Unfortunately, I can't run  in safe mode for normal use because I run  additional services.

     

    It took a few goes before everything was happy. The first time made things worse; Server and Server Admin reported nothing, although ps showed services were running. That turned out to be https://discussions.apple.com/thread/3193142?start=15&tstart=0 --- the suggested fix worked. A further attempt got things back to where started. But the final go got everything working. I think you'll all understand why I'm not rebooting again, at least not until I absolutely have to.

  • by dylanharris,

    dylanharris dylanharris Mar 24, 2012 11:07 PM in response to dylanharris
    Level 1 (0 points)
    Mar 24, 2012 11:07 PM in response to dylanharris

    I've had two more postgres failures along the lines of this topic (on different machines), and in each case a permissions check or two in safe mode, then a return to normal usage, resolved the problem, if temporarily. I don't know if this will keep things working, obviously, but it seems to help.

     

    I just hope Apple fix the root cause.

  • by pattieja1,

    pattieja1 pattieja1 Mar 28, 2012 8:45 AM in response to The Teknologist
    Level 1 (0 points)
    Mar 28, 2012 8:45 AM in response to The Teknologist

    I haven't been able to get serveradmin to manage postgres for a while now.  What I've ended up doing is manually start the postgresql service after a reboot and that seems to allow all the services to work properly.

     

    The command line I'm running under sudo from a shell script is:

     

    -------------------- Start of shell script ------------------

    #!/bin/bash

     

    nohup sudo -u _postgres /usr/bin/postgres -D /var/pgsql -c "listen_addresses=*" -c "log_connections=on"  -c "log_directory=/Library/Logs" -c "log_filename=PostgreSQL.log" -c "log_line_prefix=%t " -c "log_lock_waits=on" -c "log_statement=ddl" -c "logging_collector=on" -c "unix_socket_directory=/var/pgsql_socket" -c "unix_socket_group=_postgres" -c "unix_socket_permissions=0770" &

    --------------------- End of shell script -------------------

     

    The nohup line is all one line, no breaks.

     

    Hope this helps anyone who just can't get it to start no matter what.

    serveradmin stop postgres tries to stop in this case but fails and leaves things in a funky state, so you will have to manually stop/kill postgres if you need to restart it due to changing permission files, etc. internal to postgreSQL.

  • by rjankech,

    rjankech rjankech Apr 7, 2012 7:34 AM in response to David Crawford1
    Level 1 (0 points)
    Apr 7, 2012 7:34 AM in response to David Crawford1

    Thanks a lot David this is the one solution for me and works absolutly perfect!

  • by Uzilurcs,

    Uzilurcs Uzilurcs Apr 10, 2012 11:34 AM in response to rhearob
    Level 1 (0 points)
    Apr 10, 2012 11:34 AM in response to rhearob

    Thank you. This solves my PostgreSQL- Problem on my Server (10.7.3).

    If have opened an Ticket to Apple vor this Problem.

  • by arach,

    arach arach Apr 19, 2012 4:19 AM in response to The Teknologist
    Level 1 (0 points)
    Apr 19, 2012 4:19 AM in response to The Teknologist

    Hi guys,

     

    I've been having this problem since I "upgraded" to Lion Server. The problem disappeared when I removed the DNSUpdate utility (dyndns lookalike), and appeared again when I reinstalled the utility to keep my dns ip address in sync.

     

    Now, this might just be a coincidence. Does anyone having this issue also have DNSUpdate installed ?

     

    Thanks for your input and good luck with this chaotic piece of software.

     

    Arach

  • by TRA2010,

    TRA2010 TRA2010 Apr 24, 2012 10:43 AM in response to The Teknologist
    Level 1 (0 points)
    Apr 24, 2012 10:43 AM in response to The Teknologist

    I have 2 Lion servers, only 1 has this service failure issue and both run almost the same services.

    The original post from TheTeknologist (July 2011) solved my problem immediately.

    Thanks a million!!!!

    I can't believe that Apple have not fixed this yet!!

  • by freudling,

    freudling freudling Apr 25, 2012 5:12 PM in response to TRA2010
    Level 1 (0 points)
    Apr 25, 2012 5:12 PM in response to TRA2010

    Ok, I got my problem solved, for now.

     

    It all started with an "innocent" Software Update in Lion Server. Everytime I do a software update with this thing I just pray nothing breaks. Sure enough, on reboot, no more screensharing option listed in mounted server in Finder. Just Connected As option.

     

    So I fired up Screen Sharing App... got in from there thankfully. However, Screen sharing has broken on me several times. Grrrrrh.

     

    So then I noticed that my Wiki was causing this Curl Index error as mentioned in this thread. I did the following:

     

    1. Repaired permissions, rebooted. I actually rebooted a few times before this to no avail. After about 20 minutes (subsequent to the permissions repair and reboot), the screen share icon returned to the mounted Mac Mini on my Computer. By the way, a ton of permissions were messed up.

    2. Tried a bunch of stuff mentioned in this thread to no avail.

    3. Turned Wiki Services on and off in the Server App. Voila! My Server splash page came back.

     

    About me: Mac Mini latest, Lion Server 10.7.3, Dyndns pointing to a dynamic IP.

  • by Benezet,

    Benezet Benezet Apr 29, 2012 9:21 AM in response to Benezet
    Level 1 (0 points)
    Apr 29, 2012 9:21 AM in response to Benezet

    After seven months, I finally received an answer from Apple Enterprise Escalation Support Engineering. I don't know if this applies to everyone, but there were several undocumented fixes in 10.7.3 that were not mentioned in the release notes regarding Time Machine and PostgeSQL that ultimately resolved the issue for me.

     

    According to Apple: 10.7.3 specifically resolves an issue with Time Machine backup, where PostgreSQL databases could become unusable because of an issue with backup and automatic recovery of Postgre data

     

    Unfortunately to see the benefit I had to reinstall the system software. I had reinstalled the system software so many times before, that I resorted to using a boot disk created according to the methods described by MacWorld, et. al. to save time. If you run and upload an EDC to Apple they can tell how the system software was installed. As such they consider this an unsupported method and really are resistant to helping you until you re-install via a supported method. Having to reinstall the system software for a server implementation is really the nuclear option but I was willing to give it one more try. To make sure everything was supported, I had the techs at the Genius Bar install 10.7.3 from an image at the Apple Store. It was great in that it only took about 5 minutes to install versus the several hour process at home given the speed of my Internet connection. I'm happy to report that for the first time since October 2011 Lion Server is running flawlessly. It's been a week and so far and all my services come up as expected even after 5-6 reboots.

first Previous Page 5 of 8 last Next