Troubleshooting
Problem
Cron job fails to run because of missing username to run the job in crontab file under /etc/cron.d
Symptom
Cron job does not run and cron log reports the following error messages repeatedly:
ERROR (getpwnam() failed): No such file or directory
The failed crond job blocks RTM from graphing the data properly.
Cause
The error message is misleading, the actual root cause is the username in the cron job entry is missing.
Diagnosing The Problem
The entry of the cron job looks like this in /etc/cron.d/<filename>:
* 12 * * * /usr/bin/php /scripts/forRTM/scripts/collector1.php
The manual run of the script complete without any error
/usr/bin/php /scripts/forRTM/scripts/collector1.php
But for a cron job entry defined in a user crontab file under /etc/cron.d, it requires a username to run the job
* 12 * * * <username> <command/script> <parameters>
Resolving The Problem
Add a proper username fixes the issue.
* 12 * * * apache /usr/bin/php /scripts/forRTM/scripts/collector1.php
Document Location
Worldwide
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
23 August 2019
UID
ibm10881201