JDE-Zombies

Clear Zombies in JDE Automatically Using Command Line Utility Tool

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:

encryptSVMpass

Following is usage guide for clearzombies utility:

Usage:

clearzombies SVMHost SVMPort SVMUserID SVMPasswordEncrypted
 ESHostName ESInstanceName JDEAgentInstallPath [debugon]

Options:

	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

Parameter details

Description:
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.

Note:
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:

clear-zombie-jde-utility

Use below link to download zip archive containing both necessary files.

DOWNLOAD

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.

6 thoughts on “Clear Zombies in JDE Automatically Using Command Line Utility Tool”

  1. Hi Nimish,

    I was trying this on my system and getting an error while executing the command. With debug on it says ..

    Generating session ID cookie by accessing URL: http://ent1depsrv90:8999/manage/home
    Could not access server manager URL, please make sure server manager is up and details provided are correct!

    My SM is up and running. .. any ideas.

    Thanks,
    Soumen

    1. Hi Soumen

      This might be due to version of Server Manager. I have added compatibility for older server manager versions as well now. Please delete the existing file and download new file from the link in the post.

      Let me know if you are still facing issue with the new file.

      BR,
      Nimish

  2. Hello,. Can you please provide me the batch script in txt format so that I can create the same by changing ES,hostname,portname, etc as given below.

    Thank you,
    Sunil Tayde

    1. Hi Sunil,

      Batch script example has been added to the post.

      Please check and let me know in case of any issues.

      Best Regards,

      Nimish Prabhu

    1. Hi Stewart,

      As per our email communications, this has been resolved.

      Thanks for sharing debug info and pointing out the issue. It has been fixed now and download link has been updated with latest version of clear zombies utility.

Leave a Reply

Your email address will not be published. Required fields are marked *