Unix Agent Jobs fail due to incorrect User Environment settings

Document ID : KB000088187
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
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. 
Environment:
OS: Unix
OS Version: RHEL 7
Cause:
Cause type:
Configuration
Root Cause: Specified an invalid Unix $PATH variable, which was being inherited by all child processes of the Service Manager.
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.