Connection to CA WA Agent results in "NAK Reason(Wrong target message)"

Document ID : KB000100163
Last Modified Date : 05/06/2018
Show Technical Document Details
Issue:
When a CA WA Manager connects to submit a job to CA WA Agent, the agent may not recognize the manager.  The following message may be observed in the manager side logs.

[ERROR] DM.OutputMessageQueue. AGENT: [XXXX-XX-01_07:48:11.069] Exception caught sending to AGENT: Destination AGENT sent "NAK Reason(Wrong target message)" from AGENT, not the expected ACK. - [Originator: MANAGER_ID] [Destination: AGENT]
.....................
com.ca.wa.comp.library.communications.MessageIdentifierException: Destination AGENT sent "NAK Reason(Wrong target message)" from AGENT, not the expected ACK. 

 
Environment:
CA WA Agent 11.3 / 11.4
CA WA DE 11.3 / R12.x
Cause:
The "NAK Reason(Wrong target message)" is received due misconfigured settings on the CA Agent side.
Resolution:
When setting up a CA WA Agent, the following must be configured to match the entry on the manager (scheduler) side.
Manager ID
Manager hostname / IP
Manager port
Encryption key 
The agentparm.txt will store the above values in the following parameters (these are example, your values for parameter may be different)
communication.manageraddress_1=camanager.example.com 
communication.managerid_1=MANAGER_ID 
communication.managerport_1=7507 
​security.cryptkey=/opt/CA/WA_Agent/cryptkey.txt
You can have multiple managers added to agentparm.txt.  Each additional address, port, and ID can be added by incrementing the _n.
communication.manageraddress_2=second.example.com 
communication.managerid_2=MANAGER_ID2 
communication.managerport_2=7507

The CA WA Agent can only have one key.  The same key must be used by all the managers (if more than one manager configured in agentparm.txt).  The manager can have different keys for different agents.
 
Additional Information:
Note: Two managers may not have same port and hostname in the agentparm.txt.  You may install multiple managers on same host, but they will have to have different listening port.