Login: command not found
search cancel

Login: command not found

book

Article ID: 265929

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

The following error is seen in the Agent logs:

AGENTNAME_SJ4: AwE-9999
ErrorMsg: AwE-9999 Internal error
Details: /appworx/run/pm38201871.sh: line 33: pm38201871.sh: line 33: Login: command not found

java.lang.RuntimeException
    at com.appworx.agent.AppWorx.AppworxStandardAgent$1SpawnJob.B(AppworxStandardAgent.java:449)
    at com.appworx.agent.AbstractSpawnJob.doRun(AbstractSpawnJob.java:102)
    at com.uc4.be.threading.AbstractWorker.run(AbstractWorker.java:367)
    at java.lang.Thread.run(Thread.java:748)

While Jobs runs successfully, intermittently, a batch of Jobs may go into LAUNCH ERROR status.

A period of time is required or the Agent has to be restarted to resolve the issue.

Environment

Release : 9.4.x

Cause

Part of the Job scheduling process, Applications Manager prints required environment variables into a "pm" file (e.g pm38201871.sh) before running it.

The "pm38201871.sh: line 33: Login: command not found" occurs because line 33 in the pm file contains the following value:

last_name=OS Login;export last_name

Notice that OS Login is NOT encapsulated by double quotes, which should exist like below:

last_name="OS Login";export last_name

Because the value is not encapsulated by double quotes, the line is interpreted as 2 separate command; "last_name=OS" and "Login;export last_name"

The second command results in the error "Login: command not found"

The last_name value in the pm file references a User object's "Last Name/Description" field value. An example screenshot is below.

As seen in the screenshot, the Last Name/Descrition value REQUIRES a value containing a space to be encapsulated by double quotes. 

While double quotes are automatically included in values with spaces upon hitting the Apply/OK button, the issue occurs if the value does not have the double quotes.

 

Resolution

Review ALL Users assigned to the Agent or Jobs that run on the Agent and check the "Last Name/Description" values.

One of the Users will have a value of "OS Login" without the double quotes. 

Add double quotes to the value and save by selecting Apply/OK. This should resolve the error.