Pages

Friday, March 27, 2015

.Out file and startup JAVA_OPTION Configuration Guideline for Managed Server



WLS Managed servers can be started via two ways –
1)      Via WLS scripts
2)      Via Node Manager

In both the approach the .out file location can be different or same depend on servers configuration, but obviously everyone will be interested to have same location for .out file generation irrespective of whether we are starting WLS managed server via Script or via Node Manager. 

Also, we want to make sure, irrespective of what approach we use, the startup JAVA_OPTION parameters should not get effected. In both approach same JAVA_OPTION parameters should get use to start the WLS Mservers. 

In order to achieve this, without effecting other startup JAVA_OPTION parameters, we should follow the below guidelines.
 

Instruction1: 

If we start WLS server via WLS script then specify the .out file path in command line e.g.

nohup /u01/app/oracle/admin/_uat_domain/mserver/_uat_omain/bin/startManagedWebLogic.sh  WLS_SOA1 http://sca1-uat:7001 > /u01/app/oracle/admin/_uat_domain/cluster/logs/ WLS_SOA1 / WLS_SOA1.out 2>&1 & 





Instruction2:

Specify the same path for .out file in server-start property of Managed Server e.g.

“-Dweblogic.Stdout=/u01/app/oracle/admin/_uat_domain/cluster/logs/WLS_SOA1/WLS_SOA1.out”
 

 


Instruction3:

For rest of the startup JAVA_OPTION we should use setDomainEnv.sh file, coz this file get invoked in both startup procedure e.g.  

if [ "`expr \"$SERVER_NAME\" : \".*WLS_SOA1.*\"`" != "0" ];then

echo "Setting up Custom JAVA_OPTION Parameters for WLS_SOA1"

JAVA_OPTIONS="${JAVA_OPTIONS} -Xms4096m -Xmx4096m -Djava.net.preferIPv4Stack=true -Doracle.net.SDP=true -XverboseTimeStamp -Xverbose:memory -Xgc:pausetime -Xverboselog:/u01/app/oracle/admin/aio_uat_domain/cluster/logs/WLS_BAM1/WLS_BAM1-gc-$(date +%Y%m%d-%H%M%S).log"

else

echo " WLS_SOA1 SERVER matching criteria not met, no Custom JAVA_OPTION will be set"

fi

Instruction4:
setDomainEnv.sh is the best place to make JAVA_OPTION related changes. However, many administrator further prefer to create a separate .sh file and referred the path of that .sh file inside setDomainEnv.sh. Starting from SOA 12g Oracle has provided another approach wherein we can create a new file called "setUserOverrides.sh" and put the cutomized JAVA_OPTION inside this file and then no need to refer this file from setDomainEnv.sh. This file has already been refferred from setDomainEnv.sh out-of-box configuration. So its easy and less errorprone solution.

setUserOverrides.sh must need to be created inside $DOMAIN_HOME/bin directory

Below is the sample of setUserOverride.sh file - 


I hope by using above guidelines, WLS Managed server startup configuration will not conflict to each other irrespective of which procedure we use to start WLS Mserver, the outcome will be same.

No comments:

Post a Comment