ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Unix Agent Jobs fail due to incorrect User Environment settings

book

Article ID: 88187

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Error Message :
chmod: command not found
rmdir: command not found
rm: command not found

U02003028 Shell 'bash' not found. Using standard shell.

A Unix Agent will start, but will not perform basic commands such as chmod, rm, rmdir, etc. Within the Agent log, the following message may also be observed:

U02003028 Shell 'bash' not found. Using standard shell.

Within the Report of the Job, the following (or similar) error(s) can be observed:
 
chmod: command not found
rmdir: command not found
rm: command not found

Investigation
  1. Check the Automic Service Manager process - is it being started by systemd?
  2. Check whether an invalid Unix $PATH variable has been specified. This will be inherited by all child processes of the Service Manager, causing them to not be able to execute the bash shell (which has the effect of falling back to calling /bin/sh). ​
In this case, this means that nothing defined in the ~/.bash_profile and ~/.bashrc files for the Unix user accounts the Agent runs as can be found/executed. 

Cause

Cause type:
Configuration
Root Cause: Specified an invalid Unix $PATH variable, which was being inherited by all child processes of the Service Manager.

Environment

OS: Unix
OS Version: RHEL 7

Resolution

Modify your Unix $PATH variable references in the associated configuration files to reflect an accurate path.

Alternately, remove the Environment=PATH line in /etc/systemd/system/automic.service and restart the services. 


Fix Status: No Fix

Fix Version(s):
N/A

Additional Information

Workaround :
Start the Agent from the command line with a user whose profile is correctly loaded.