CNC folks have been battling with zombies for years now and Oracle still has not come up with an option to remove/clear zombies periodically/automatically from enterprise servers. Zombies are those process which have gone defunct and are no longer useful. But at times the parent process (jdenet_n) does not release the resources used by these processes. Zombies may be created due to database issue, faulty code or process errors. When such zombie processes pile up, they consume your server’s valuable resources, leading to slowness of system. And slowness in production environment, is something that can affect your business to a large extent and may cost you time and money.
There are only two ways to clear these zombies:
- Clear zombies for affected enterprise server from Server Manager
- Kill zombie’s parent process – which would involve restarting JD Edwards services on enterprise servers (this is certainly out of the picture for production environment)
To solve this problem, I have created a command line utility “clearzombies”. This tool accepts several parameters as input and clears zombies from an enterprise server by making web calls to Server Manager. You can schedule this tool, as a command or a batch file script, using windows task scheduler.
To avoid the problem of passing password as a plaintext (as this is a cause of security concern for many organizations), I have also created another utility called “encryptSVMpass” to generate an encrypted password which can be passed to “clearzombies” utility. encryptSVMpass usage is as follows:
Following is usage guide for clearzombies utility:
clearzombies SVMHost SVMPort SVMUserID SVMPasswordEncrypted ESHostName ESInstanceName JDEAgentInstallPath [debugon]
SVMHost Hostname of the server on which server manager is installed SVMPort Port number on which server manager is running, generally it is 8999 SVMUserID User ID to login to Server Manager SVMPasswordEncrypted Use encryption tool 'encryptSVMpass' to generate encrypted password ESHostName Hostname of Enterprise Server as registered in Server Manager ESInstanceName Instance name of Enterprise Server as registered in Server Manager JDEAgentInstallPath Full path to directory where agent is installed, can be obtained from Server Manager debugon Optional parameter, will output debug messages while execution
Example Usage 1:
clearzombies JDEDEPSVR 8999 jde_admin 6pNmxcl6jImEn0aD81KYPNi4NyEG5FkKEV2lTbnUAPCC32QcfZvzNm3h4YGFHJFI9cGJIE9t+/KODu6XnIKYXzMOF+BhCSjfRx66uXZ4DURu/7hIu6Z4KHycqB61K/6s JDEENTSVR Ent_Prod /u01/apps/jdedwards/agent
Example Usage 2:
clearzombies JDEDEPSVR.company.com 8999 jde_admin 6pNmxcl6jImEn0aD81KYPNi4NyEG5FkKEV2lTbnUAPCC32QcfZvzNm3h4YGFHJFI9cGJIE9t+/KODu6XnIKYXzMOF+BhCSjfRx66uXZ4DURu/7hIu6Z4KHycqB61K/6s JDEUBESVR.company.com Ent_Prod /u01/apps/jdedwards/e900/jde_home/agent
clearzombies is a command line utility which takes necessary inputs and performs web calls to login to Server Manager, access process details page for provided enterprise server, determine if there are any zombie processes and if found, it sends a payload request to Server Manager’s ajax handler servlet, which clears the zombie process.
Ensure that ESHostname, ESInstanceName and JDEInstallPath are exactly as registered in Server Manager. These details can be obtained from Server Manager Dashboard page and you are advised to copy paste it from there instead of typing, to avoid human error.
Following is a screenshot of functioning of clearzombies utility:
Use below link to download zip archive containing both necessary files.
If you have multiple enterprise servers, save commands for each server, one server per line, in a batch file (copy the command with full path to a text file and save it with .bat extension) and schedule batch file to run, say for example, every 1 hour. Follow this link to know how to schedule a task in windows task scheduler, second half of the article describes scheduling a program/script.
Following is an example of batch script for 2 servers, it can be modified for any number of servers:
@echo off REM Set the path in which clearzombies.exe has been placed SET dirpath="C:\CNC_Tools\ClearZombies" cd %dirpath% REM Initialize variables SET SVMHost="JDEDEPSVR" SET SVMPort="8999" SET SVMUserID="jde_admin" SET SVMPasswordEncrypted="6pNmxcl6jImEn0aD81KYPNi4NyEG5FkKEV2lTbnUAPCC32QcfZvzNm3h4YGFHJFI9cGJIE9t+/KODu6XnIKYXzMOF+BhCSjfRx66uXZ4DURu/7hIu6Z4KHycqB61K/6s" SET ESHostName="JDEDEVSVR" SET ESInstanceName="ent_dev" SET JDEAgentInstallPath="/u01/apps/jdedwards/agent" clearzombies %SVMHost% %SVMPort% %SVMUserID% %SVMPasswordEncrypted% %ESHostName% %ESInstanceName% %JDEAgentInstallPath% SET ESHostName="JDEPRDSVR" SET ESInstanceName="ent_prd" SET JDEAgentInstallPath="/u01/apps/jdedwards/agent" clearzombies %SVMHost% %SVMPort% %SVMUserID% %SVMPasswordEncrypted% %ESHostName% %ESInstanceName% %JDEAgentInstallPath%
Save this code in a file with .bat extension and schedule it in task scheduler to automate clearing of zombies in your JD Edwards setup.
I have tested this tool with latest server manager releases and it works fine. Please add comments in case you face any issues or to report bugs with the tool. If you would like to have something customized for your project in a similar manner, please use contact form to reach me and I will get back to you.
Edit: Support for Server Manager 8.98 has been added as well.