Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a 10.7.4 Lion Server installation the Server fails to start correctly. The window is drawn and the last known server and its services are displayed, but a spinning wheel keeps spinning on the bottom status bar. log shows:

Jun 24 18:19:56 mac01 servermgrd[437]: [437] error in getAndLockContext: flock(servermgr_info) FATAL time out
Jun 24 18:19:56 mac01 servermgrd[437]: [437] process will force-quit to avoid deadlock
Jun 24 18:19:56 mac01 servermgrd[437]: outstanding requests are: (
            Command = getHistory;
            Module = "servermgr_info";
            Timestamp = "2012-06-24 16:17:51 +0000";
            Command = getState;
            Module = "servermgr_info";
            Timestamp = "2012-06-24 16:17:51 +0000";
            Command = Idle;
            Module = "servermgr_info";
            Timestamp = "2012-06-24 16:18:50 +0000";
Jun 24 18:19:56 mac01[1] ([437]): Exited with code: 1

There are 3 services enabled: dns, firewall, mail. DNS plugin gave an error message which cannot be reproduced.

Other errors in are:

Jun 28 12:49:58 mac01 ServerBackup[32087]: Error in calling backup command for service postgresql, error :=69
Jun 28 12:51:24 mac01 mds[99]: (Error) Volume: Could not find requested backup type:2 for volume
Jun 28 12:53:01 mac01 mds[99]: (Error) Server: ==== XPC handleXPCMessage XPC_ERROR_CONNECTION_INVALID

(Regression) Other sources suggested to try:

  1. review DNS settings, no problem found there
  2. check the hostname with sudo changeip -checkhostname, no problem found there
  3. destroy the Open Directory installation, OD is not used here
  4. reboot, that did not solve the problem
  5. replace /Library/Preferences/ with a known good copy, that did not help
  6. replace the Server itself with a known good copy, also did not improve
  7. issuing a sudo launchctl unload -w /System/Library/LaunchDaemons/;sudo launchctl load -w /System/Library/LaunchDaemons/, as in my answer below, which only partly solves the issue. Server Admin started correctly once, but on second and consecutive launches the spinning wheel keeps spinning again and log shows the deadlock situations again.
  8. untick 'require valid digital signature (SSL)' in server admin prefs just incase you haven't trusted your server cert, no change.
  9. check if it is a user issue, by creating a new admin user and try starting server admin from that login, errors out (kReceivedUnknownError says Server Admin, process will force-quit to avoid deadlock is in the log, but no outstanding requests are in the log)
  10. Changed the connecting server address from 'name.local' to '', no change.
  11. sudo launchctl unload -w /System/Library/LaunchDaemons/;sudo rm -r /var/servermgrd;sudo launchctl load -w /System/Library/LaunchDaemons/, no change
  12. > hardware > hostname > settings > uncheck dedicate resources to server services, reboot, check again, reboot, no change
  13. $ diskutil repairPermissions /;sudo reboot, no change
  14. corrected the rDNS entry to match the machine name, so that no longer displays an alert that the network has changed on every boot.

Other repeating log file entries are:

29-06-12 02:58:01,943 configd: network configuration changed.
29-06-12 02:58:33,575 configd: network configuration changed.
29-06-12 02:58:33,597 configd: network configuration changed.
29-06-12 02:58:34,266 servermgrd: servermgr_ipfilter:ipfw config:Notice:Flushed IPv4 rules
29-06-12 02:58:34,578 servermgrd: servermgr_ipfilter:ipfw config:Notice:Flushed IPv6 rules
29-06-12 02:59:50,707 servermgrd: servermgr_filebrowser:Error:servermgr_filebrowser: Error getting quotas for volume /Volumes/H of type exfat

After hours of trying to isolate the problem, I can reproduce that the flock(servermgr_info) FATAL time out is related to the local DNS service. When DNS service is started the Server generates the flock(servermgr_info) FATAL time out, when DNS is then stopped (and $ sudo launchctl unload -w /System/Library/LaunchDaemons/;sudo launchctl load -w /System/Library/LaunchDaemons/ to be sure that there is a clean starting point) next time Server behaves OK and no flock(servermgr_info) FATAL time out is logged.

Anonymised serveradmin DNS configuration extracted using $ sudo serveradmin settings dns) is here:

dns:acls:_array_index:0:name = ""
dns:acls:_array_index:0:addressMatchList:_array_index:0 = "localhost" = "" = "" = "" = "" = "" = _empty_array = "" = _empty_array = ""
dns:isBonjourClientBrowsingEnabled = no

Irony is that localhost is not configured as DNS resolver:

$ networksetup -getdnsservers Ethernet

When DNS service is stopped, Server Admin sometimes still keeps spinning. Having a look at Servername > Network > shows that in the pane with "Network Interfaces" the DNS name is empty.

nslookup -type=ptr returns the correct value. A dig PTR for the PTR is ok, and a dig PTR +trace stops after recursion number 4:

.           77760   IN  NS
.           77760   IN  NS
;; Received 244 bytes from in 5 ms       172800  IN  NS
...<cut>...       172800  IN  NS
;; Received 432 bytes from in 7 ms    86400   IN  NS
...<cut>...    86400   IN  NS
;; Received 200 bytes from in 2 ms 172800 IN  NS 172800 IN  NS 172800 IN  NS
;; Received 110 bytes from in 1 ms

;; connection timed out; no servers could be reached

Now there is also a new message logged:

Jun 29 14:49:10 mac01 servermgrd[1039]: Still servicing 0:0 requests after 300 seconds, with 1 sessions outstanding, resetting idleTimer

Update #1 It looks like the issue might be a rDNS (reverse DNS) PTR configuration error. A dig +trace from a 10.5 machine at a different location results in couldn't get address for '': not found. The network provider has been asked to fix this flaky (and faulty) DNS configuration.

Update #2 Another suspect is the built-in firewall. When the firewall is stopped there are no hangs. When the firewall is started, the spinning wheel never stops.

Update #3 The provider fixed by assigning a DNS A record with IP address at August 23th. Result: still a spinning wheel at the bottom right part of Mac OS Server Admin, and after a few minutes

"The service has encountered an error. Try to refresh the view ( (kReceivedUnkownError).

Followed by a:

"The service has encountered an error. Try to refresh the view ( (kReceivedUnkownError).

Update #4 The next issue is a CentOS version 5.4 software firewall at the servers where both and are running on, that kicked in on Mac OS X 10.7.4 Lion + Server + Admin Tools DNS traffic patterns: # lfd: (PERMBLOCK) has had more than 4 temp blocks in the last 86400 secs - Sun Jun 17 21:20:08 2012

After clearing this block in the CentOS firewall, the firewall block is back within 10 hours for each IP address that is running 10.7.4 and is having a reverse DNS name that is authoritatively served by the CentOS 5.4 machines.

Let's see what a whitelist on the CentOS firewall will do for machines running Mac OS 10.7.4.


How to fix this DNS service related servermgrd flock(servermgr_info) error (for instance by factory default resetting dns service)?

share|improve this question

I had the same issue. As suggested here, I tracked the problem down to a bad NS record (typo) for the reverse zone.

changeip -checkhostname reported no issues manually checking the forward/reverse all looked good.

But when I specifically checked the NS record for the reverse zone, noticed the typo.

share|improve this answer

$ sudo launchctl load -w /System/Library/LaunchDaemons/ and the issue was gone for a few minutes.

share|improve this answer
This solved only on first Server launch, on later launches the flock(servermgr_info), force quit to prevent a deadlock, and spinning wheel situation was back. – Pro Backup Jun 24 '12 at 17:09
  1. Add a firewall "Address Group" for IP address "".
  2. Give the "Services"-tab "Allow all traffic" permissions for that newly created group.
share|improve this answer
Creating this firewall rule, is not enough. The error messages like servermgrd: error in getAndLockContext: flock(servermgr_info) FATAL time out and servermgrd: process will force-quit to avoid deadlock are still popping up. – Pro Backup Jul 11 '12 at 14:59
up vote 0 down vote accepted

Review the firewall configuration of the authoritative DNS servers for the PTR records of your (public) IP address.

In our case, when looking up the PTR records of the public IP address ( for example) by using the reverse notation ( in Terminal on the Lion Server:

  1. $ dig NS +short results in:

  2. $ dig PTR results in:

    ; <<>> DiG 9.7.3-P3 <<>> PTR

    ;; global options: +cmd

    ;; connection timed out; no servers could be reached

In other words the DNS packets were discarded by an intermediary firewall.

After whitelisting the IP adress of the Mac OS X Server in the firewall of each authorative DNS server, the "getAndLockContext: flock(servermgr_info) FATAL time out" issue was gone.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.