Jobs are failing with exit code 2 for one user
search cancel

Jobs are failing with exit code 2 for one user

book

Article ID: 220018

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Jobs are failing with exit code 2.

Cannot process job or inventory

Environment

Release : 12.0

Component : CA Workload Automation Database Agent

Resolution

All the job on this one agent were failing.
If you change the owner to root the jobs ran.
In looking at the spool files for the failed jobs we noticed the following odd looking environment variable value

SHELL=/home/user123:/bin/bash
and when the agent tried to run the job it showed:
Tue Jul 20 16:14:28 2021 CAWA_I_20041 Executing /home/user123:/bin/bash -bash -c /apps/aut....
where as normally one would expect
Tue Jul 20 16:14:28 2021 CAWA_I_20041 Executing /bin/bash -bash -c /apps/aut...
You tried to su to the job owner but could not.
The user was in the /etc/passwd file but the entry was corrupted by an invalid update (at the time the problem started).
Correct the /etc/passwd entry so "su"ing to the user is possible and they have a valid shell.