Problem: Server logs show lots of: "Unable to find any record with GUID XXX" errors after deleting users from the directory.
The problem here is that the deleted users were referenced as proxy for some other users and the proxy database is not part of the directory but separately maintained by the calendar server (since that behavior is specific to the server). Since proxies are managed via access control on the calendar server, often when someone makes a request of the server, the access control list has to be evaluated and the list of users in the proxy list expanded. That is when the missing GUIDs show up. You can run a special "proxy cleanup" tool to remove the deleted GUIDs from the proxy db and stop these errors from occurring.
How to run a tool to clean-out missing GUIDs from the proxy database
Here is a python script that can be run to clean-up the proxy DB:
To use this do the following:
- Download the script to the calendar server machine
- Stop the calendar server
- Backup the /Library/CalendarServer/Documents/principals/.db.calendaruserproxy file (will need to sudo to see that)
- Run:
sudo python proxyclean
- Examine the records that it reports. Check that the GUIDs returned correspond to some of those reported in the server log.
- If everything looks OK at this point, re-run the tool with the -c option to actually fix the db:
sudo python proxyclean -c
- Run one more time without -c to verify that fixed it.
- Restart the calendar server.
- Verify that the missing principals errors are gone.
If users report that proxies are all missing after running this tool, then shut down the calendar server and restore the backed-up .db.calendaruserproxy file.
