Suddenly, the cause remains unknown, one particular SAP Agent is no longer able to detect the termination of Jobs submitted to a SAP system.
Instead, the Jobs are executed correctly on SAP end, but remains in status Active and REPORTER appears as Transferring on Automic as seen below:
Job is executed in SAP. Automic status continues to be active with Report showing as transferring. Job is hung and long running.
Release : 12.3.x or 21.0.x
Component : Automation Engine
Sub-Component: Agent SAP
The root cause could be found only after enabling the Agent SAP Traces in Advanced Options to rfc=9 as shown below:
On the SAP Agent trace log (ucxjr3x_trace_00.txt) we would find the following kind of error right after having submitted the job to SAP:
20220715/171011.260 - 79 RETURN=( TYPE="E", ID="XM", NUMBER=026, MESSAGE="You have no authorization to log on to interface XBP", LOG_MSG_NO=000000, MESSAGE_V1="XBP", ROW=0, SYSTEM="TS1CLNT100" )
20220715/171011.260 - 79 BAPI_XMI_LOGON end
20220715/171011.260 - 79 ***LOGON_FAILED
This pointed to a missing permission/role on the SAP User defined on the Connection Object for Automic Agent to connect to the SAP System.
After investigation on SAP end, it was found that the cause was that a specific Role in the SAP Service Account used in the Automic Connection Object that contains the right to pull/retrieve data had been removed from the Service Account during the SAP Environment refresh. That role stops Automic Agent from being able to retrieve execution data from SAP thus the process is hung.
Engage SAP Security Teams to give the right access to the SAP Service Account adding back the missing Role as specified on the documentation