All jobs failing with error "Invalid AFM"
search cancel

All jobs failing with error "Invalid AFM"

book

Article ID: 200450

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - System Agent (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent Autosys Workload Automation

Issue/Introduction

After starting the Scheduler, all jobs are failing with an <Invalid AFM> error. This is regardless of the Agent the jobs run on.

Cause

AFM (Automated Framework Message) is the proprietary language that the System Agents understand. AFM has a particular syntax.

When jobs are submitted, the AutoSys Scheduler passes all the job information to the Agent using AFM.

The issue is caused by a malformed AFM message where the syntax used is incorrect. This can happen if there is a bad configuration on the Scheduler side.

For example:

The $AUTOUSER/config.$AUTOSERV file has an AutoServer parameter. This should be set with a comma-separated list of application servers hostnames like in this example:

#-------------------------------------------------------------------#
#      #  #  #  #  Application Server Parameters  #  #  #  #        #
#-------------------------------------------------------------------#

#+----------
#
# Keyword: AutoServer=<hostname>
#
# Defines the host name of the  application server that you want to
# connect to.
#
AutoServer=hostname1,hostname2

A hidden character or an incorrect carriage return can cause this parameter to be passed incorrectly when scheduling to an Agent. Example:

#
AutoServer=hostname1,hostname2 <hidden space or tab> <no proper carriage return>
# Some comment

When the job is passed to the Agent in the above example, the receiver.log file shows the Agent received this as part of the job:
Attribute1(Type=AsServers,Value="hostname1,hostname2 # Some comment")

The job fails with an <Invalid AFM> error because the above AFM syntax is wrong.

The correct syntax would have been:
Attribute1(Type=AsServers,Value="hostname1,hostname2")

Resolution

In the above example, the solution is to clean up the config file AutoServer entry so any hidden characters, missing carriage returns or any incorrect data is removed, like this:

#-------------------------------------------------------------------#
#      #  #  #  #  Application Server Parameters  #  #  #  #        #
#-------------------------------------------------------------------#

#+----------
#
# Keyword: AutoServer=<hostname>
#
# Defines the host name of the  application server that you want to
# connect to.
#
AutoServer=hostname1,hostname2

A restart of the Scheduler is needed for the change to take effect.

 

If there are no extra spaces, or all of the CRLF's at the end of the lines are correct, try running

autorep -q -J jobname

In one case we were able to see strange characters in the command line at the beginning and end that were not visible in the regular JIL:

ôC\:\Program Files\TELE\Server\Utilities\Tele.StorageMaintenance.exeö

 


However, there could be a number of incorrect configurations that could be passed to the Agent. If you encounter this issue, the best thing to do is to collect the Agent logs from one of the Agents and raise a Broadcom support ticket, attaching said logs.

Support will be able to identify where the AFM syntax errors are and where the source of the values are so they can be corrected on the Scheduler side.