When you are working on OEM agent upgrade. Sometimes you might face an error EMD pingOMS error: unable to connect to http server at OMShost. [handshake has no peer].
It is a sort of bug, with no proper fix. You can try various workarounds related to OEM agents, but most of them will not be helpful.
Error:
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.4.0.0.0
OMS Version : (unknown)
Protocol Version : 12.1.0.1.0
Agent Home : /u05/app/oracle/agent13c/agent_inst
Agent Log Directory: /u05/app/oracle/agent13c/agent_inst/sysman/log
Agent Binaries : /u05/app/oracle/agent13c/agent_13.4.0.0.0
Core JAR Location : /u05/app/oracle/agent13c/agent_13.4.0.0.0/jlib
Agent Process ID : 1769
Parent Process ID : 1668
Agent URL : <Link>
Local Agent URL in NAT : <Link>
Repository URL : <Link>
Started at : 2022-11-22 10:04:29
Started by user : oracle
Operating System : AIX version 7.1 (ppc64)
Number of Targets : 16
Last Reload : (none)
Last successful upload : 2022-11-22 16:28:12
Last attempted upload : 2022-11-22 16:28:12
Total Megabytes of XML files uploaded so far :18.21
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.01
Available disk space on upload filesystem : 52.07%
Collection Status : Collections enabled
Heartbeat Status : OMS is unreachable
Last attempted heartbeat to OMS : 2022-11-22 16:28:29
Last successful heartbeat to OMS : (none)
Next scheduled heartbeat to OMS : 2022-11-22 16:28:29
---------------------------------------------------------------
Agent is Running and Ready
oracle@sajidserver01.com:$ ./emctl pingOMS
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD pingOMS error: unable to connect to http server at OMShost. [handshake has no peer]
oracle@sajidserver01.com:$ ./emctl upload agent
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload error:full upload has failed: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors. (OMS_DOWN)