Q: Periodic errors authenticating caldav/carddav
I'm having users from iCal and via their iPhones get periodic errors while trying to connect to our MacOS X Lion server. The caldav logs show an odd error:
2012-04-11 14:24:53-0700 [-] [caldav-6] [PooledMemCacheProtocol,client] [calendarserver.platform.darwin.od.opendirectory#error] Error Domain=com.apple.OpenDirectory Code=5205 "Authentication server encountered a communication error while attempting the requested operation." UserInfo=0x7fc5e2f1db00 {NSLocalizedDescription=Authentication server encountered a communication error while attempting the requested operation., NSLocalizedFailureReason=Authentication server encountered a communication error while attempting the requested operation.}
2012-04-11 14:24:53-0700 [-] [caldav-6] [PooledMemCacheProtocol,client] [twistedcaldav.directory.appleopendirectory.OpenDirectoryRecord#error] OpenDirectory (node=xxx.seatme.com) error while performing digest authentication for user jordan: Error Domain=com.apple.OpenDirectory Code=5205 "Authentication server encountered a communication error while attempting the requested operation." UserInfo=0x7fc5e2f1db00 {NSLocalizedDescription=Authentication server encountered a communication error while attempting the requested operation., NSLocalizedFailureReason=Authentication server encountered a communication error while attempting the requested operation.}
So it seems that ocacssionally, the connection to OpenDirectory simply fails. Has anyone else run into this problem? We have about 50 devices hitting this server and when it happens, iCal prompts the user saying their password is invalid and asks them to enter their password again which is subpar to say the least.
Mac mini Server (Mid 2011), Mac OS X (10.7.3)
Posted on Apr 11, 2012 2:40 PM
We work-around it using what Jonathan Miller posted. Specifically:
/Library/LaunchDaemons/com.seatme.checkpwservice.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.seatme.CheckPwService</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/checkpwservice</string>
</array>
<key>WatchPaths</key>
<array>
<string>/private/var/log/opendirectoryd.log</string>
</array>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>ThrottleInterval</key>
<integer>30</integer>
</dict>
</plist>
/usr/local/bin/checkpwservice (from Jonathan):
if tail -n20 /private/var/log/opendirectoryd.log | grep -q "Broken pipe"
then
killall PasswordService;
sleep 5;
killall opendirectoryd;
sleep 5;
exit;
fi
Then load it:
chmod 755 /usr/local/bin/checkpwservice
launchctl load -w /Library/LaunchDaemons/com.seatme.checkpwservice.plist
Posted on Jul 5, 2012 11:18 AM