Saturday, July 13, 2013

starting Managed server in invisible Window

Problem: Closing startWebLogic.cmd execution window - SHUTDOWN server

We were working on Oracle Fusion Middleware environment, where the WLS_FORMS managed server was down. We need to bring it up by starting the server immediately, because it is live we have tried to start with nodemanager. But, it is failed! due to the stdout log rotation failure unable to start the managed server. The servers running on the same Windows machine are well and RUNNING state.

Production environments we cannot keep a server DOWN for longer time. So first we tried with immediate temporary solution is to start the managed server from the domain home we need to keep a CMD window open. If someone logged in and closed the window the server will be down again! In UNIX we have nohup and &(ampersand) to run in the background. Now we need similar solution in Windows platform. After working in Unix platform for many years, felt Windows is hard to us!!! There is always a way for this problem. Solution we identified as below:

Temprory Fix: Start Managed server in background on Windows platform

Let me give you complete walk through for the Windows Shell script as workaround. Usually, we run the below command line for starting the Form server manually.
C:\wls_domains\clstr_dom\bin\startManagedWebLogic.cmd WLS_FORMS

This server status cannot be updated to Nodemanager if it is started manually like above. Same line we tried to set in the below Windows shell but it couldn't work, so alternative idea is 'Create a new CMD file for starting managed server... like for us it is WLS_FORMS File named as startforms.cmd.

Now create the following .VBS file that will help you to run the managed server in background.

Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run chr(34) & "C:\wls_domains\classicDomain\bin\startForms.cmd" & Chr(34), 0
Set WshShell = Nothing

Copy the above lines to Notepad and save the file with the .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it.

In the background we were working on alternative, complete fix. The analysis started with why nodemanager could not start the managed server? What NodeManager saying about this issue. The nodemanager.log file in the nodemanager in the WebLogic installation. The standard out file for Forms, WLS_FORMS.out file not able to rename to new WLS_FORMS.out001xx. I have tried same thing at the command line. It is telling that unable to rename the file due to some other process is using the file. Now there is a need to find that what other file uses this standard out file.

Solution: Stdout log file (SERVER_NAME.out) file Rotation

In the Oracle Fusion Middleware environments, if the Stdout file is being accessed by dejvm. Oracle Forms, Reports running environment uses Developer JVM (dejvm) process. In the Unix environment you can easy to identify with 'ps -ef| grep dejvm'. To resolve the above issue, go to the Windows TaskManager find the dejvm process and kill that. Now no process is using the stdout file, now you start the managed server using nodemanager or Weblogic Console.

Little idea about dejvm - The process named dejvm is a process that Oracle Forms uses as the JVM controller. The jvmcontroller.cfg file defines the defult dejvms. Its purpose in life is to be the process which a pool of JVMs are attached so that not all Forms process that need use WLS_FORMS Server JVM. This lowers system resource usage and in effect pools of JVMs.

Thankyou for being with me in this blog post. write your comment or suggest your experiences that adds more.

1 comment:

  1. Bluehost is ultimately one of the best hosting provider with plans for all of your hosting requirments.


Blurb about this blog

Blurb about this blog

Essential Middleware Administration takes in-depth look at the fundamental relationship between Middleware and Operating Environment such as Solaris or Linux, HP-UX. Scope of this blog is associated with beginner or an experienced Middleware Team members, Middleware developer, Middleware Architects, you will be able to apply any of these automation scripts which are takeaways, because they are generalized it is like ready to use. Most of the experimented scripts are implemented in production environments.
You have any ideas for Contributing to a Middleware Admin? mail to me