chk_auto_up job fails with Exit code 131, Status: "An attempt was made to move the file pointer before the beginning of the file."
search cancel

chk_auto_up job fails with Exit code 131, Status: "An attempt was made to move the file pointer before the beginning of the file."

book

Article ID: 234235

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Trying to run this job:

insert_job: AUTOSYS_Monitor-Servers  job_type: CMD 
command: chk_auto_up -r 111
machine: host1234
owner: autosys@host1234
permission: 
date_conditions: 1
days_of_week: su,mo,tu,we,th,fr,sa
start_mins: 5
description: "Monitor status of Application Server, Event Server and Scheduler."
std_out_file: "C:\temp\logs\%AUTO_JOB_NAME%.std"
std_err_file: "C:\temp\logs\%AUTO_JOB_NAME%.err"
alarm_if_fail: 0
group: AFSAIA
application: AUTOSYS
send_notification: 1
notification_msg: "Verify Autosys servers are available"
success_codes: 0, 111

We are seeing an exit code of 131.

agent log shows:

-- excerpt --

Thu Feb 03 10:04:59 2022 CAWA_I_20013 Command to be executed: "C:\windows\SYSTEM32\cmd.exe" /c "chk_auto_up -r 111"
Thu Feb 03 10:04:59 2022 CAWA_I_20022 Process created with pid: 5900
Thu Feb 03 10:05:02 2022 CAWA_I_20018 Job failed. Exit code 131, Status: "An attempt was made to move the file pointer before the beginning of the file."

 

Environment

Workload Automation AE (AutoSys)

Resolution

The command chk_auto_up will exit with different return codes based on what processes are up and available and your configuration.
For the full list of possible return codes see here:
https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/autosys-workload-automation/12-0-01/reference/ae-commands/maintain-system/chk-auto-up-command-confirm-application-server-scheduler-and-event-server-status.html

As the command job was sent to a Windows host the agent checked the operating system for that exit code's text.  

Which explains the why the message "An attempt was made to move the file pointer before the beginning of the file" was displayed in the job log yet the command ran without issue.

You will need/want to adjust the job definition to allow higher return codes, like 131, to allow the job to go to success without issue.