How do I get rid of com.apple.launchd.peruser errors in my log?
I'm getting repeated errors in my console log that look (basically) like this:
10-09-29 10:06:08 AM com.apple.launchd[1] (com.apple.launchd.peruser.501[51581]) getpwuid("501") failed
10-09-29 10:06:08 AM com.apple.launchd[1] (com.apple.launchd.peruser.501[51581]) Exited with exit code: 1
This machine was set up using the migration assistant, from a machine where my UID was 501, but here it's 505. I have the same username and group set, of course, but...
So, where is this peruser launchd tool configured, so that I can disable the daemons that are causing this error message?
I can answer your last question, but it will take more work to solve the problem.
The peruser
indicates a launchd
daemon started by a userland process. The numeric suffix is the UID. In this case, an application attempted load a launchd job as user 501. That failed, since there appears to be no user 501 on your system.
Have you installed software recently? User management utilities changed in Leopard, so an installer intended for an older version (Tiger?) may not work properly in 10.5,6.
Start by taking a look at ~/Library/LaunchAgents
, /Library/LauchAgents
, and /Library/LaunchDaemons
. There may be a job that's UID 501.
If not, you could do a (brute-force) search for an application/file owned by 501 -
$ sudo find /Applications -user 501 | less
If anything turns up, that will point to the culprit.
I removed Mozy from my applications, but every 10 seconds kept getting the following error messages to the point where the system would freeze:
9/16/12 11:51:53 AM com.apple.launchd.peruser.501[146] (com.mozy.status[543]) Exited with exit code: 1
9/16/12 11:51:53 AM com.apple.launchd.peruser.501[146] (com.mozy.status) Throttling respawn: Will start in 10 seconds
9/16/12 11:52:03 AM com.apple.launchd.peruser.501[146] (com.mozy.status[544]) posix_spawn("/Library/PreferencePanes/MozyHome.prefPane/Contents/Resources/MozyHome Status.app/Contents/MacOS/MozyHome Status", ...): No such file or directory
So I went to launchctl list
and sure enough com.mozy.status
was still the list (despite having used "uninstall" to remove mozy) so I then instructed launchctl
to remove com.mozy.status
from the list:
launchctl remove com.mozy.status
I went back and looked at the list and sure enough it was removed and the error messages stopped. No reboot required.
HOWEVER: I later discovered this was only a temporary solution. Every time I reboot com.mozy.status is back on the launchctl list and has to be removed manually as described above. So this does not appear to be a permanent solution. If anyone knows how to remove com.mozy.status from launchd.peruser permanently, please share.
PS. I already removed com.mozy.status from the library
Daemons are in:
~/Library/LaunchAgents
/Library/LaunchAgents
/Library/LaunchDaemons
/Library/StartupItems
The configuration location for launchd is /private/var/db/launchd.db/
.
Just be very very careful when making changes in that folder as you could easily mess up the system.