Agent disconnects or cannot start - U02000313 Communication error...
search cancel

Agent disconnects or cannot start - U02000313 Communication error...

book

Article ID: 427506

calendar_today

Updated On:

Products

Automic SaaS

Issue/Introduction

An agent that was connected to a SaaS system for a long time suddenly disconnects with messages like:

20260128/172526.979 - U02000385 Web socket error: 'An existing connection was forcibly closed by the remote host'.
20260128/172526.979 - U00045014 Exception 'java.io.IOException: "An existing connection was forcibly closed by the remote host"' at 'sun.nio.ch.SocketDispatcher.read0()'.
20260128/172527.011 - U02000196 Next attempt to create a CP connection in '10' seconds.
20260128/172537.052 - U02000379 Initiating connection to server 'ws-tenantid.saastest.example.com:443' using WebSocket URI: 'wss://ws-tenantid.saastest.example.com:443/agent'.
20260128/172537.146 - U02000438 Number of trusted certificates loaded from 'Windows Certificate Store': '55'.
20260128/172537.161 - U02000484 This agent trusts '178' certificates when creating a JCP connection.
20260128/172619.560 - U02000313 Communication error with partner 'ws-tenantid.saastest.example.com:443', error: 'Connection timed out: no further information'.

Attempting to restart the agent from that point fails with the following in the agent log:

20260130/091755.931 - U02000379 Initiating connection to server 'ws-tenantid.saastest.example.com:443' using WebSocket URI: 'wss://ws-tenantid.saastest.example.com:443/agent'.
20260130/091756.165 - U02000438 Number of trusted certificates loaded from 'Windows Certificate Store': '55'.
20260130/091756.181 - U02000484 This agent trusts '178' certificates when creating a JCP connection.
20260130/091838.846 - U02000313 Communication error with partner 'ws-tenantid.saastest.example.com:443', error: 'Connection timed out: no further information'.
20260130/091838.893 - U02000074 Connecting to system 'AUTSYSTEM' is not possible.
20260130/091838.893 -           Initial connection with endpoint not possible. Please check your configuration.
20260130/091838.909 - U02000041 Shutdown Agent 'AGENT_NAME'.
20260130/091838.909 - U02000002 Agent 'AGENT_NAME' version '24.3.0+build.1732290291368' ended abnormally.

A Windows Agent can also fail to start (rather than disconnect after a long-running connection) with a different U02000313 error text, indicating a TLS handshake/certificate failure rather than a network timeout:

U02000313 Communication error with partner 'ws-tenantid.saastest.example.com:443', error: 'Remote host terminated the handshake'.
U02000327 Unexpected error on connection '*SERVER' (socket handle = '1'), reason '"category: 'asio.ssl', (...) certificate verify failed (SSL routines, tls_process_server_certificate)"'.
U02000002 Agent ... ended abnormally.

Environment

Automic Type: SaaS

Resolution

Troubleshooting can be done to help see where the problem lies

  1. See if the JCP endpoint is reachable from the server where the agent is started:

    - Open the agent ini and find the connection= line
    - On Windows, open a browser and navigate to the url with https:// in front
    - On linux, run a curl command like:

    curl https://[setting in connection= parameter of ini file]

    In both cases, you should see a message:
    WebSocket deployed

    If you do not, then the JCP endpoint is not reachable from the server and you should engage your network team.

  2. You can run the following command from the agent server and doublecheck that the returned IP address is on the whitelisted IP list:

    curl https://ip.saas.automic.com/

 

  • If the endpoint from #1 above is not reachable, you will need to engage your network team to see what is happening on the outgoing call.

  • If the endpoint result from #2 above is a different IP address than what is whitelisted, you can engage your network team to see if that was meant to happen or open a case with Broadcom Support to whitelist the IP or IP range.
  • If the endpoint from #1 above is reachable and the IP from #2 above returns and IP that is whitelisted, please reach out to Support, referencing the results of both of the above and uploading an agent log file.  Support can check what's happening on the SaaS side of things.

  • If instead the error is 'Remote host terminated the handshake' with a 'certificate verify failed (SSL routines, tls_process_server_certificate)' reason (rather than a timeout), the reachability checks above should still be run first (an intercepting proxy/firewall can present its own certificate mid-handshake and trigger this same error), then check certificate trust:

    - Confirm the required Root and Intermediate certificates for the SaaS endpoint are imported into Local Computer > Trusted Root Certification Authorities on the agent machine, since the Windows Agent validates the server certificate against the Windows certificate store.

    - If the agent's ini file sets trustedCertFolder= instead of relying on the Windows store, confirm it points to a directory containing the correct public certificate(s) for the SaaS endpoint.

    - If both of the above look correct, engage your network team to rule out an SSL-inspecting proxy, firewall, or IPS sitting between the agent and the SaaS endpoint - these devices intercept the TLS handshake and substitute their own certificate, which the agent will not trust.