When the Harvest Agent has been running for a while, defunct processes are produced.
search cancel

When the Harvest Agent has been running for a while, defunct processes are produced.


Article ID: 55217


Updated On:


CA Harvest Software Change Manager - OpenMake Meister



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.


When a Harvest Agent is started (by default) it will:

  1. Traverse the RTserver Name list (in HAgent.cm or HAgent.arg files) and connect to RTserver

  2. If start_never prefix does not exist, try to start the RTserver

  3. Try to connect to the RTserver again. If still failed, it can try another RTserver in the list of RTservers provided.

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: 

* 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)


* 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

  1. In previous versions of Harvest (5.x) defunct processes associated to Agent process was observed for various reasons. Make sure you're on a currently supported release of Harvest before implementing the above suggested changes. Contact CA Technical Support in case of any concern/clarifications.

  2. Also in Harvest 7.x, the architecture of Hexecp/Agent causes the agent to spawn a defunct process for 30 seconds whenever an asynchronous Hexecp is executed against the Agent. After 30 seconds, the Agent process recoups that defunct process.


Release: CCCHAR01300-7.1-Harvest-Software Change Manager-Concurrent User