Running OSX Lion Server (10.7.4), and about once a week or so the Apple File Sharing service stops letting clients connect to its shares. On the client we will see a dialog box stating "There was a problem connecting to the server ". Browsing the server we simply no longer see the shares. The clients are also running the latest OSX (10.7.4)
In /var/log/system.log we see entries like the following:
Jun 26 08:38:22 w3 AppleFileServer[20511]: received message with invalid client_id 157
Jun 26 08:42:11 w3 AppleFileServer[20511]: received message with invalid client_id 165
Jun 26 08:42:21 w3 AppleFileServer[20511]: received message with invalid client_id 174
Where 20511 appears to be the pid, and client_id appears to be incremented with each failed attempt.
Nothing jumps out at me from /Library/Logs/AppleFileService/AppleFileService[Access|Error].log
Restarting the service fixes the problem:
serveradmin stop afp && serveradmin start afp
So I added a script to do this daily using the periodic service. But, we still encounter this problem about once a a week.
We are no longer experiencing this problem. Inspecting the logs going back 6 months I do not see the reported error message, nor am I receiving reports from users failing to connect to the file share.
Since that time we have upgraded the server to 10.7.5, and many clients are running OSX 10.8.x. So, unfortunately I do not know the root cause, but I am assuming that running the latest updates resolves the problem.