0 Replies Last post: Jan 17, 2012 3:06 PM by Community Admin  
Novice 44 posts since
Mar 30, 2009
Currently Being Moderated

Jan 17, 2012 3:06 PM

SOA Suite Startup Scripts

Starting the SOA Suite 11g on UNIX (Linux, Solaris, AIX, OEL, others).  Preferred order to start SOA Suite 11g:

 

- start Database

- start Node Manager

- start Admin Server

- start Managed Servers and Clusters

 

If you want Node Manager to restart a failed Managed server you must ensure that either the nodemanager.properties file or the startup.properties has the parameters AutoRestart=true and StartScriptEnabled=true. I believe this is set to true in the startup.properties by default. The nodemanager.properties file can be found in  $MW_HOME/wlserver_10.3/common/nodemanager

 

Create a scripts called startNM.sh in the directory your choice, e.g. /usr/oracle/scripts/weblogic/startup
here is a sample script, adjust for your environment:


MW_HOME=/u01/oracle/product/middleware

 

$MW_HOME/oracle_common/common/bin/setNMProps.sh

nohup $MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh > $MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.out &

nohup $MW_HOME/user_projects/domains/soa_domain/bin/startWebLogic.sh > $MW_HOME/user_projects/domains/soa_domain/servers/AdminServer/logs/AdminServer. out &

. $MW_HOME/user_projects/domains/soa_domain/bin/setDomainEnv.sh

java weblogic.WLST /home/oracle/scripts/weblogic/startup/startMS.py

Please note that each command is separated by a empty line, therefore the nohup commands are one command until the &

Now create the WLST script as called by the startNM.sh script above. Call it startMS.py:

 

import time
sleep=time.sleep
print "#####################################"
print "# Waiting for Admin Server to Start #"
print "#####################################"
while True:
try:
connect(adminServerName="AdminServer")
break

 

except:

sleep(60)

print "##############################"
print "# Admin Server has come up #"
print "##############################"

print "##########################"
print "# Starting SOA Server 1 #"
print "##########################"

start(name="soa_server1", block="true")

print "##########################"
print "# Starting OSB Server #"
print "##########################"

start(name="osb_server1", block="true")

print "##########################"
print "# Starting BAM Server #"
print "##########################"

start(name="bam_server1", block="true")

exit()

When you use these scripts you will get errors in the WLST script while it waits for the AdminServer to come up this is to be expected so just ignore. I have set the retry for 60 seconds so it shouldn’t try too many times.

Also you may get an error like 'ERROR: transport error 202: bind failed: Address already in use'. This is caused because 2 managed servers are using the same debugging port. If this is the case then you can edit the setDomainEnv.sh file and turn debugging off. Do this by searching for debugFlag="true" and set it to false, e.g. debugFlag="false".

If you want a shutdown script, it is much the same but in reverse.

Create a script called stopMN.sh in directory of your choice, e.g. /usr/oracle/scripts/weblogic/shutdown:

 

MW_HOME=/u01/oracle/product/middleware

 

. $MW_HOME/user_projects/domains/soa_domain/bin/setDomainEnv.sh

$MW_HOME/oracle_common/common/bin/setNMProps.sh

java weblogic.WLST /home/oracle/scripts/weblogic/shutdown/stopMS.py

nohup $MW_HOME/user_projects/domains/soa_domain/bin/stopWebLogic.sh > $MW_HOME/user_projects/domains/soa_domain/servers/AdminServer/logs/AdminServerS hutdown.out &

  1. Create a WLST script in the same directory called stopMS.py:

    connect(adminServerName="AdminServer")

     

    exitonerror=false
    # Stop all managed Servers
    shutdown('soa_server1','Server', force="true")
    shutdown('osb_server1','Server', force="true")
    shutdown('bam_server1','Server', force="true")

    exit()

More Like This

  • Retrieving data ...