Background
Enterprise Communicator (PEC) is an interprocess messaging software product that enables processes to communicate quickly, reliably, and securely across different operating system platforms. Harvest uses PEC as the underlying layer for its communication. Harvest Agent, Broker, HServer and Commandline programs are all RTClients in the PEC architecture. RTClients communicate with each other through a router process - RTServer. RTclients cannot exist by themselves and need to be connected to an RTServer. Once they loose connection to RTServer, they either try to connect to the RTserver back, or try to re-start the RTserver if the re-connect doesn't establish connection.
In most Harvest installs, the Broker machine is same as the machine hosting RTserver process. Usage of a RTserver local to the Agent machine is not preferred, but, there maybe some unique circumstances when this is needed. Contact CA Technical Support for more details if you're using such local RTservers.
Description
When a Harvest Agent is started (by default) it will:
Note: Any options set in $RTHOME/standard/HAgent.cm (if exists) are over-ridden by similar options set in $HARVESTHOME/HAgent.arg
If the Agent looses connection with an RTserver, it will follow (b) and (c) steps above. Such a disconnect may happen when the RTserver host is taken down for maintenance or because of a network hiccup. Depending on the platform, some defunct processes are seen while the Agent tries to restart the remote RTserver (usually through rsh). Such remote restart is not normally needed. So setting the right -rtserver parameter in HAgent.arg file should solve this issue of defunct processes associated to the Agent process.
Default $HARVESTHOME/HAgent.arg: -rtserver=HostName
* where HostName is the hostname of the RTserver (as described initially in this article, usually this would the Harvest Broker's hostname)
Setting that'll prevent the restart of remote RTserver: (assuming tcp is the protocol that you're using. This is the default protocol for PEC/Harvest interface)
-rtserver=start_never:tcp:HostName:PortNumber
* where PortNumber is the RTserver's listen port. Default listen port is TCP/5101.
In conjunction with the above setting, below parameters are also needed to keep the Agent running healthy. These parameters would go into a file $RTHOME/standard/HAgent.cm (create/edit that file accordingly)
setopt server_disconnect_mode warm
setopt server_keep_alive_timeout 60.0
setopt server_start_delay 20.0
setopt server_start_max_tries 1000
Once the above changes are made, restart the Agent and verify if the agent defunct processes continue to appear over a period of time. Contact CA Technical Support if the issue persists.
Other Relevant Information