Linux shell script file for Start/Stop Weblogic Services

 

This time we are sharing a shell script for starting/stopping Weblogic services. This shell script can

  1. Start Weblogic Admin Server (after starting Node Manager)
  2. Once the Admin server started, you can start the forms and reports services using the Admin Console
  3. Unless conflicts, you should able to access the Oracle enterprise manager console as well

Copy the content below in plain text file first, change the extension to .sh and set the execute permissions

 

 

 

 

[sourcecode language=”bash” gutter=”false” wraplines=”true”]
#!/bin/sh

if [ -z "$1" ]; then
echo "You must supply either start or stop command while calling this script! correct usage: weblogic_start_stop.sh start|stop"
exit
fi

bold=`tput bold`
normal=`tput sgr0`

case "$1" in
‘start’)
echo "Starting Management Node & Weblogic Server 10.3.6"

echo "Starting NodeManager"

nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &

sleep 10

output=`ps -ef | grep -i nodemanager.javahome | grep -v grep | awk {‘print $2’} | head -1`

set $output

pid=$1

echo "Weblogic NodeManager Service was started with process id : ${bold}$pid${normal}"

echo "Starting WebLogic Domain"

nohup $MW_HOME/user_projects/domains/ClassicDomain/bin/startWebLogic.sh > /dev/null 2>&1 &

# Sleep until exiting
sleep 60
echo "All done, exiting"
exit
esac

################################Stopping the services##################################

case "$1" in
‘stop’)
echo "Stopping Weblogic Server & Node Manager"

nohup $MW_HOME/user_projects/domains/ClassicDomain/bin/stopWebLogic.sh > /dev/null 2>&1 &

sleep 30

# echo "Killing Nodemanager process now"

output=`ps -ef | grep -i nodemanager.javahome | grep -v grep | awk {‘print $2’} | head -1`
set $output
pid=$1
echo "Killing Weblogic NodeManager Service Process : ${bold}$pid${normal}"

kill -9 `ps -ef | grep -i nodemanager.javahome | grep -v grep | awk {‘print $2’} | head -1`

echo "All done, exiting"
exit
esac

[/sourcecode]

 

 

 

 

If you have queries, please ask them using comments section.

for Windows7bugs

rajesh

Weblogic 10.3.6, Oracle application instance service “Oracle Process Manager (asinst_1)” missing

Oracle Process Manager (asinst_1) where asinst_1 is the instance name you chose while configuring the forms & reports 11g. We noticed that once after upgrading Windows 8 to Windows 8.1, almost all the Oracle services (database, weblogic related) were been removed from the windows services database, which forced us to re-create them manually!

Our Weblogic server was installed for the lab, hence none were accessing them once after the first level tests. Thus we were not aware of the issues related to OPMN, which were usually started by Application Instance services during each boot (unless start mode set manual)

Here we are providing you a quick method to create the missing Oracle Process Manager (<instancename_1)” service using Windows command line

from an elevated command window, issue the following command (please alter the paths according to your installation physical locations)

[code language=”text” light=”true”]
C:\WINDOWS\system32>SC CREATE "OracleProcessManager_asinst_1" binPath="D:\Weblogic\Middleware\Oracle_FRHome1\opmn\bin\opmn.exe -S -I D:\Weblogic\Middleware\asinst_1" type= own start= auto
[/code]

Note: Optionally you can add DisplayName string for the service you want to create along with the command line.

If the service creation was successful you should receive a confirmation, other hand an error message

[SC] CreateService SUCCESS” or Error Message

You may stop OPMN manually, and then try to start the newly created service to confirm the service creation was successful.

That’s all folks!

for Windows7bugs

rajesh

Oracle, Migrating from Developer 6i to 11g & Weblogic Application Server 10.3.6

 

There are no guarantees that Windows 7 and Windows 8 machines will support Client/Server architecture applications developed by Oracle developer 6i, even after your patch certain .dll files (refer to our previous post here )

So, it is time to move on. Many legacy applications cannot be discontinued as they serve the businesses in tailored manner. Hence the best practices should include migration to latest Oracle products and retaining such applications for next “N” number of years.

We are going to draft the easiest methods to migrate to Oracle Weblogic server 10.3.6 & Developer suite 11g briefly over here. Please read on how to install the weblogic server here

Make sure you have made multiple backups for your forms 6i source modules & reports

Create local folders from development machines with easily identifiable names (eg: myapp11gtest)

Start compiling your 6i modules (forms, menu modules, libraries) using 11g forms developer or use the batch mode compiler.

Address the obsolete triggers (KEY-NEXT-ITEM for eg)

Port the compiled forms & other modules to your weblogic server

Please note, if your environment is totally windows based, you may not recompile the form modules once again at weblogic server end. On the other hand if you are developing modules on windows environment and later porting them to Weblogic server hosted in a linux environment, you must recompile the modules once again

Idiot proof notice: Always keep multiple backups for your source files!, You cannot port 6i applications compiled using Developer 10g suite to Weblogic server which has 11g developer suite components and expect the .fmx files to load

regards,

admin