AM Asset Job failed with Error "UNIX: Shellscript failed"

Document ID : KB000067976
Last Modified Date : 26/12/2018
Show Technical Document Details
Issue:

An AM Asset Job for Unix/Linux machines is always in ERROR for all machines with Status message : "UNIX: Shellscript failed"

 

Error Message

 

In TRC_AMAGENT_*.log following error appears :

 

amagent   |amagent     |cagent.cpp   |001887|INFO   | * Job <Running CommandFile> will be executed
amagent   |amagent     |cagent.cpp   |001587|WARNING| Could not stat '/opt/CA/DSM/Agent/AM/data/config/04-02-475.ini', error 2
amagent   |amagent     |cagent.cpp   |001606|INFO   | No need to change '/opt/CA/DSM/Agent/AM/data/config'
amagent   |amagent     |cagent.cpp   |001382|INFO   | #-> /opt/CA/DSM/Agent/AM/data/config/04-02-475.ini
amagent   |cfOSServices|cfOSServices |000000|DETAIL | ICFOSProcess::GetReturnCode: Child process 5718 exited with rc = 126
amagent   |cfOSServices|cfOSServices |000000|DETAIL | ICFOSProcess::Create: Created child process 5718 = /bin/sh /tmp/tmpcmd.00.TyMMQI
amagent   |amagent     |myPopen.cpp  |001372|DETAIL | Wait for up to 86400 seconds
amagent   |amagent     |myPopen.cpp  |001353|INFO   | Execution of ICFOSProcess /opt/CA/DSM/Agent/AM/data/config/04-02-475.ini returned 126
amagent   |amagent     |myPopen.cpp  |001207|DETAIL | Closed without using output
amagent   |amagent     |myPopen.cpp  |001246|DETAIL | Process </opt/CA/DSM/Agent/AM/data/config/04-02-475.ini> finished with RC 126
amagent   |amagent     |cagent.cpp   |001606|INFO   | No need to change '/opt/CA/DSM/Agent/AM/data/config'
amagent   |amagent     |cagent.cpp   |001926|ERROR  | * STATUS = ERROR


 

or 
 
 
amagent   |amagent     |cagent.cpp   |001756|INFO   | * Job <Running CommandFile> will be executed
amagent   |amagent     |cagent.cpp   |001765|INFO   | chown returns: 0 2
amagent   |amagent     |cagent.cpp   |001394|INFO   | #-> /opt/CA/DSM/Agent/AM/data/config/03-02-2C.ini
amagent   |amagent     |myPopen.cpp  |000394|INFO   | ENTER method MyPopen::Execute
amagent   |cfOSServices|cfOSServices |000000|DETAIL | ICFOSProcess::GetReturnCode: Child process 7667964 exited with rc = 127
amagent   |cfOSServices|cfOSServices |000000|DETAIL | ICFOSProcess::Create: Created child process 7667964 = /bin/sh /tmp/tmpcmd.00.BQAaah
amagent   |amagent     |myPopen.cpp  |001368|INFO   | Wait for up to 86400 seconds
amagent   |amagent     |myPopen.cpp  |001349|INFO   | Execution of ICFOSProcess /opt/CA/DSM/Agent/AM/data/config/03-02-2C.ini returned 127
amagent   |amagent     |myPopen.cpp  |001194|INFO   | ENTER method MyPopen::Close
amagent   |amagent     |myPopen.cpp  |001202|DETAIL | Closed without using output
amagent   |amagent     |myPopen.cpp  |001241|INFO   | Process </opt/CA/DSM/Agent/AM/data/config/03-02-2C.ini> finished with RC 127
amagent   |amagent     |myPopen.cpp  |001271|INFO   | EXIT method MyPopen::Close
amagent   |amagent     |cagent.cpp   |001795|ERROR  | * STATUS = ERROR

 

Resolution:

This problem could occur if the size of Asset job exceeds 255000 characters.

There is a limit of 255000 characters in AM jobs for Unix/Linux Agents. This limit does not exist for Windows Agent.

The solution is to decrease the size of Asset job under 255000 characters.

Examples of actions which could be made in order to decrease the size :

  • Remove comment lines
  • Remove unnecessary sequence of blank characters or empty lines

 

 Delete the Asset job containing the script with more than 255000 characters and create a new Asset Job with the script containing less than 255000 characters.


For Linux Agent 14.0 SP2 a fix is available to extend the limit of 255000 characters : T5IZ400
Please contact CA Technical Support to ask fix T5IZ400