Automic agent failed to start with the following message in the log directory "<AGENT_INSTALL_LOCATION>\temp"
20220503/173836.381 - U02000071 Current directory: C:\Automic\Automation.Platform\Agents\Windows\bin
20220503/173836.381 - U02000360 Agent 'WIN01' has been started with process ID '596'.
20220503/173836.387 - U02000066 Host information: Host name='blrbdl002890-01', IP address='10.80.152.60'
20220503/173836.387 - U02000066 Host information: Host name='blrbdl002890-01', IP address='fe80::39da:2b9b:7e7:47a7'
20220503/173836.387 - U02000350 Agent supports IP version: 'IPv4'
20220503/173836.387 - U02000350 Agent supports IP version: 'IPv6'
20220503/173836.388 - U02000331 OpenSSL library Version 'OpenSSL 1.1.1l 24 Aug 2021' is used.
20220503/173836.388 - C:\Automic\Automation.Platform\Agents\Windows\bin\libssl-1_1-x64.dll
20220503/173836.388 - C:\Automic\Automation.Platform\Agents\Windows\bin\libcrypto-1_1-x64.dll
20220503/173836.389 - U02000134 Thread 'TCP-Thread' started.
20220503/173836.390 - U00003486 ListenSocket with port number '[127.0.0.1]:2300' successfully created.
20220503/173836.390 - U00003486 ListenSocket with port number '[0.0.0.0]:2300' successfully created.
20220503/173836.392 - U02000379 Initiating connection to server 'blrbdl002890-01.bpc.broadcom.net:8443' using WebSocket URI: 'wss://10.80.152.60:8443/agent'.
20220503/173836.393 - U02000072 Connection to system 'AUTOMIC' initiated.
20220503/173836.397 - U02000309 Unable to load Agent certificate file 'C:\Automic\Automation.Platform\Agents\Windows\bin\security\WIN01.pem', reason 'bad decrypt'.
20220503/173836.398 - U02000378 Loading certificates from directory: 'C:\Automic\certs'.
20220503/173836.398 - U02000377 Certificate loaded from file 'C:\Automic\certs\jetty.cer'.
20220503/173836.444 - U02002039 Successfully established connection with '*SERVER' (socket handle = '1').
20220503/173836.472 - U02000336 Connection '*SERVER' (socket handle = '1') renamed to 'AUTOMIC#CP002'.
20220503/173836.472 - U02000004 Connection to Server 'AUTOMIC#CP002' successfully created.
20220503/173836.473 - U02000308 Agent certificate file 'C:\Automic\Automation.Platform\Agents\Windows\bin\security\WIN01.cert' was loaded, expiration date '20230502/122433'.
20220503/173836.473 - U02000308 Agent certificate file 'C:\Automic\Automation.Platform\Agents\Windows\bin\security\WIN01_ca.pem' was loaded, expiration date '20420427/132554'.
20220503/173836.560 - U02000401 Received JCP server list: 'https://blrbdl002890-01:8443/'
20220503/173836.566 - U02000304 Unable to load private key 'C:\Automic\Automation.Platform\Agents\Windows\bin\security\WIN01.pem', reason 'error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt'.
20220503/173836.566 - U02000302 Agent shutdown has been initiated with return code '2000304'.
20220503/173836.566 - Waiting for File Transfer threads ...
20220503/173836.566 - U02000041 Shutdown Agent 'WIN01'.
20220503/173836.577 - U02000076 Connection to CP Server 'AUTOMIC#CP002' closed.
20220503/173836.668 - U02000135 Thread 'TCP-Thread' ended.
20220503/173836.669 - U02000002 Agent 'WIN01' version '21.0.2+hf.1.build.20' ended abnormally.
Agent Release: 21.0 and higher
Error is due to the existence of the old/corrupt files under the agent security directory
Remove all the files under "agentSecurityFolder" i.e., by default "<AGENT_INSTALL_LOCATION>\bin\security" unless changed in the Agent's configuration file.
C:\Automic\Automation.Platform\Agents\Windows\bin\security
Update the property "trustedCertFolder=" in the agent configuration file "<AGENT_INSTALL_LOCATION>\bin\UCXJWX6.ini" with an appropriate location where the server certificate is placed.
For example, if the server certificate is placed under "C:\Automic\certs", the value should be -
trustedCertFolder=C:\Automic\certs
Save the file and restart the agent.