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
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]
..................... Destination AGENT sent "NAK Reason(Wrong target message)" from AGENT, not the expected ACK. 

CA WA Agent 11.3 / 11.4
CA WA DE 11.3 / R12.x
The "NAK Reason(Wrong target message)" is received due misconfigured settings on the CA Agent side.
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) 
You can have multiple managers added to agentparm.txt.  Each additional address, port, and ID can be added by incrementing the _n. 

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.