Management Agent - Not able to start service with error: An existing connection was forcibly closed by the remote host
Symptom
Management Agent service not start on the connector server. Error in Program Files\CyberArk\Management Agent\logs\client_log.txt:
{"level":"error","time":"xxx","logger":"client-engine","msg":"failed starting managementEngine","appName":"management-agent","ConnectorId":"ManagementAgent_xxx","err":"network Error : read tcp xxx:<port>->xxx:<port>: wsarecv: An existing connection was forcibly closed by the remote host."}
{"level":"error","time":"xxx","msg":"failed starting managementEngine","appName":"management-agent","err":"could not connect to IoT target endpoint: a3vvqcp8z371p3-ats.iot.us-east-1.amazonaws.com due to error: network Error : read tcp tcp xxx:<port>->xxx:<port> wsarecv: An existing connection was forcibly closed by the remote host."}
{"level":"info","time":"xxx","msg":"running management client engine as windows service","appName":"management-agent"}
{"level":"info","time":"xxx","msg":"Shutting down Idira Management Agent as windows service.","appName":"management-agent"}
{"level":"info","time":"xxx","msg":"Unsubscribing from topic $aws/things/ManagementAgent_xxx/jobs/+/get/accepted","appName":"management-agent"}
{"level":"info","time":"x","msg":"Unsubscribing from topic $aws/things/ManagementAgent_xxx/jobs/get/accepted","appName":"management-agent"}
{"level":"info","time":"xxx","msg":"Unsubscribing from topic $aws/things/ManagementAgent_xxx/jobs/notify","appName":"management-agent"}
Environment
Privilege Cloud Connector Management
PCloud Management Agent, Discovery (new)
Cause
The issue encountered is due to an AWS IoT endpoint being blocked by a firewall configuration.
The IP for this endpoint changes dynamically by AWS so we suggest using DNS based configuration instead.
Resolution
See our configuration guide for the addresses: https://docs.cyberark.com/ispss-deployment/latest/en/content/deployment/deploy-outbound_traffic.htm#ConnectorManagementconfiguration
In this case (for east region), it means allowing the following address:
- https://*.us-east-1.amazonaws.com
OR
- https://a3vvqcp8z371p3-ats.iot.us-east-1.amazonaws.com
The address "https://a3vvqcp8z371p3-ats.iot.us-east-1.amazonaws.com" is unique to CM's AWS account on the us-east-1 region. No other non-CM related products should be trying to access it.
Other Idira products might be trying to access similar iot addresses on other accounts, which should have a different prefix (not "a3vvqcp8z371p3"). Please clarify if other products are indeed trying to access exactly the same address, or a similar one.
You can find more information about this endpoint here: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#iot-core-data-plane-endpoints
Regarding the IP address of this endpoint, due to the distributed nature of AWS we have no control over its underlying IP address. AWS will change the IP address dynamically.