Monday, 19 January 2015

Weblogic Patching


Weblogic Patching : Generic Information

Oracle has started releasing PSU ( Patch Set Update ) from Weblogic Server 10.3.4 onwards, and depreciated BSU ( smart update ) utility from Weblogic Server 12.1.2 onwards. That means, You can still use BSU to apply patch till WLS 12.1.1 but from WLS 12.1.2 you have to use Opatch utility which is bundled with weblogic installer or you can download from oracle support website as well.

PSU doesn't mean Oracle will not be going to release CPU ( Critical Patch Updates ), CPU still be there for all versions prior to 12.1.2 versions as per requirement and criticality.

Read my below posts for more details.

Weblogic Server Patching, BSU ( Smart Update Utility )
Weblogic Server Patching, Prior to 12.1.1, On and after 12.1.2 ( Release of PSU [ Patch Set Update ])


Weblogic Patching Method Changes , Prior to 12.1.1, On and after 12.1.2


Weblogic Patching Method Changes , Prior to 12.1.1, On and after 12.1.2

Weblogic Server Patching, CPU ( Critical Patch Update ) and PSU ( Patch Set Update )

As I have explained in my earlier post "Weblogic Server Patching" - 

BSU ( Smart Update ) utility can be used to apply patch below weblogic 12.1.2 versions, but Opatch utility 12.1.2 on-wards.

From Weblogic 10.3.4, Oracle has started releasing PSU ( Patch Set Update ) and same can be applied to the Weblogic server.

CPU ( Critical Patch Update ) & PSU ( Patch Set Update )

Earlier Oracle were releasing CPU ( Critical Patch Updates ) every quarterly for weblogic Server. CPU is one of the specific patch to fix some of the critical issues encountered in some of the production environment of the some client, Which could be generic and may impact other client production as well thus, Oracle release that as CPU for all clients to apply. 

PSU is Patch Set Update and it's cumulative. Means every release of PSU included all previously release patches, CPU as well as all other released patches. It's a bundle of critical fixes as well as few more fixes those are not critical but can impact production environments of clients anytime.

So, if you are going to apply PSU then don't bother about previous patches and conflictions, since it's included all previous patches as well so during apply, it will remove all previous applied patches automatically and apply again with new patches and will increment you patch set update no by one, for example from 10.3.4.0.1 to 10.3.4.0.2.


Note -  Oracle has started releasing that doesn't mean it's not going to release CPU's, it's still there for previous versions of Weblogic 10.3.4 wherever applicable.


PSU Tracking & Versioning

Earlier Oracle were using 3 number standard format for version like, in 10.3.4, 10 is Major version, 3 is minor version and 4 is patch set or you can say service pack. Now after PSU, oracle has started using 5 number versioning format, like 10.3.4.0.1, Where 10.3.4 meaning is same i have explained, 4th digit "0" reserved for some future use and last number 1 is representing patch set update.


So, Like in WebLogic Server 11g  [10.3.1+], product versions are numbered a1.a2.a3.a4.a5 where
  • a1=Is the major version
  • a2=Is the minor version
  • a3=patch set or you can say maintenance pack or service pack
  • a4=it reserved for future use
  • a5=PSU (patch set update)

Last a5 will maintain for PSU's and will increment with each new PSU release like 10.3.4.0.1 then 10.3.4.0.2 etc.

So by this, it will help all to maintain and remember only one last digit to know which patch set update was applied instead of remembering all applied on off patches ( CPU's ).


There is a difference in versioning WLS 12c onwards as below 

Version number contain 5 decimal places and versioning maintained as below

Suppose if your weblogic version if Weblogic 12c ( 12.1.2.0.0 ) then 


  • The first two decimal places together describe the Major Version number, for example "12.1" in 12.1.2.0.0.
  • The first three decimal places together describe the Minor Version number, for example "12.1.2" in 12.1.2.0.0
  • According to the version conventions, a Patch Set release for WebLogic Server 12.1.2.0.0 would increment the fourth decimal place, for example 12.1.2.1.0.
  • Patch Set Update releases are named uniquely by incrementing the fifth decimal place, for example 12.1.2.0.1


So, Net Net

In WebLogic Server versions up to 12.1.1, Smart Update should be used to install/uninstall both interim and PSU patches.

In WebLogic Server 12.1.2 and higher, OPatch should be used to install/uninstall both interim and PSU patches











Weblogic Server Patching


There are two different ways to apply patch in weblogic server ( Prior to Weblogic Server 12.1.2 versions )

From Weblogic Server 10.3.4 onwards Oracle has started releasing PSU ( Patch Set Updates ), and Opatch Utility to use from WLS 12.1.2 onwards to apply PSU, I will publish my next post on same shortly

1. [ Old One ] Download patch ( .jar files ) from oracle support site and add jar files directly   to your server classpath.

2. Use BSU utility provided with Weblogic

First one is very simple, just extract jar files and updated classpath in your common environment script which is calling in each startup script or you can update classpath in each server stratup script.

Updating patch with BSU utility is also a simple one. Extract patch zip file once you have downloaded from oracle support and run bsu command as below to apply patch.

1. Extract patch zip file under  $ORACLE_HOME/utils/bsu/cache_dir/ 
    Note - ORACLE_HOME is same as BEA_HOME
2.Run below command

Syntax :  

$./bsu.sh -prod_dir=<WEBLOGIC_HOME> -patchlist=<patchid> -verbose -install -log=<any_file_name>.
/bsu.sh -prod_dir=/opt/Oracle/Middleware/wlserver_10.3 -patchlist=KYXZ -verbose -install -log=error.log
Where -
a. /opt/Oracle/Middleware/wlserver_10.3 is your weblogic home directory
b. KYXZ ( KYXZ.jar ) is the patch jar file which you have extracted from patch zip file
In similar way, to install multiple patched together, just apply them separate by a comma as below
/bsu.sh -prod_dir=/opt/Oracle/Middleware/wlserver_10.3 -patchlist=KYXZ,P6UT -verbose -install -log=error.log
3.  To verify run below command
./bsu.sh -prod_dir=/opt/Oracle/Middleware/wlserver_10.3 -view -status=applied 
or
./bsu.sh -report
you can grep your patch no to verify as well as below
./bsu.sh -prod_dir=/opt/Oracle/Middleware/wlserver_10.3 -view -status=applied | grep -i KYXZ 

Note- Before applying patch, make sure to shutdown your weblogic server completely and to take backup.


To remove a patch use below command
./bsu -remove -patchlist=KYXY -prod_dir=/opt/Oracle/Middleware/wlserver_10.3 -verbose



Weblogic Server Editions & Features


Hello Guy's, I am getting lot's of emails to get understanding on different editions and their respective features So, publishing this post on same. 

There is no command to check which Edition of weblogic you are using because it's just about features which tied up with your licensing boundation So, if you wanted to know which edition of weblogic you are using then you have only option to understand your license agreement with Oracle.



Friday, 16 January 2015

Weblogic Server Versions



Weblogic Server Versions  ( As on date 16-Jan-2015 )

WebLogic Server 12c Release 3 (12.1.3) - June 26, 2014
WebLogic Server 12c Release 2 (12.1.2) - July 11, 2013
WebLogic Server 12c Release 1 (12.1.1) - Dec 1, 2011
WebLogic Server 11gR1 PS5 (10.3.6) - February 26, 2012
WebLogic Server 11gR1 PS4 (10.3.5) - May 16, 2011
WebLogic Server 11gR1 PS3 (10.3.4) - January 15, 2011
WebLogic Server 11gR1 PS2 (10.3.3) - April 2010
WebLogic Server 11gR1 PS1 (10.3.2) - November 2009
WebLogic Server 11g (10.3.1) - July 2009
WebLogic Server 10.3 - August 2008
WebLogic Server 10.0 - March 2007
WebLogic Server 9.2
WebLogic Server 9.1
WebLogic Server 9.0 - November 2006
WebLogic Server 8.1-bea - July 2003
WebLogic Server 7.0 - June 2002
WebLogic Server 6.1
WebLogic Server 6.0 - file date March 2001 on an old CD
WebLogic Server 5.1 (code name: Denali) First version supporting hot deployment for applications (via command line)
WebLogic Server 4.0
WebLogic Tengah 3.1 - June 1998
WebLogic Tengah 3.0.1 - March 1998
WebLogic Tengah 3.0 - January 1998
WebLogic Tengah - November 1997

Weblogic Server 12c Dynamic Cluster



Weblogic Server Dynamic Cluster

Weblogic Server 12C 12.1.2 onwards Oracle introduced a new feature of clustering, called Dynamic Clustering.  As clear from the name Dynamic, it’s a dynamic cluster where Managed Servers created dynamically at cluster creation time based on a cluster template and no of managed servers you specified during cluster creation. So, you don’t need to create Managed Servers separately, just mention how many managed servers you want with some basic configuration details like range of ports which you want to assign to managed servers, prefix for managed servers which will add at start of each managed server etc, and based on the standard template all managed servers will be created there. For any configuration changes you just have to change template configuration and it will be applicable for all clustered managed servers.


Another important use is, if anytime you think that you need one or more than one managed servers, just change the no of managed servers count configuration and it will create managed servers for you, you just go and restart newly created managed servers and it/they will start participating in cluster requests.


More Coming Shortly.............

Thursday, 15 January 2015

Node Manager in Weblogic Server 12C


Node Manager in Weblogic Server 12C

In WebLogic 12c, the Java version of Node Manager has a simplified, out-of-the-box configuration. Node Manager is moved from PerHost configuration to PerDomain configuration model. The Install Windows Service screen, which provided the option to install Node Manager as a service on Windows systems, is no longer included.

In WebLogic 12c for each domain you create, an instance of domain-specific Node Manager is created/configured by default. With this default configuration, using the security credentials supplied for the Administration Server, nm_password.properties is created in DOMAIN_HOME\config\nodemanager. We can use Configuration Wizard or WLST tools to create Domain/Node Manager configuration. We can select a PerDomain or CustomLocationJava-based Node Manager configuration model. The PerDomain configuration is exactly as described for the default configuration, except that it allows you to provide unique Node Manager credentials. If you want a seperate location for NodeManagerHome, select CustomLocation and specify an empty directory or select to create one. The resulting Node Manager also runs as a per domain process.

After the default installation, the nodemanager.properties and nodemanager.domains files are created for you under DOMAIN_HOME\nodemanager and domain-specific scripts to start, stop, install and uninstall Node Manager as a Windows service, are created under DOMAIN_HOME\bin. With the default Node Manager configuration, you cannot edit the NodeManagerHome location, in this case it will be DOMAIN_HOME\nodemanager.

Let's see the process step by step. I will use the configuration wizard tool to create a sample domain. After starting the wizard and proceeding for the first few steps you will be prompted to choose the components to modify/create. Here you can select Node Manager option to configure some of it's properties like Node Manager type, Node Manager username and password, and Node Manager location.



On the next screen we can modify the following properties;

Node Manager Type:

Per Domain: If you select this option, the Node Manager home is predefined within the domain as <domain_name>/nodemanager and you cannot edit the Node Manager home. 

Custom Location: Select this option if you want the Node Manager configuration files to be created in a specific location for this domain. Specify the directory in the Node Manager Home field, or click Browse to navigate to the location. The specified directory must be empty. The nodemanager.properties and nodemanager.domains files will be created in this directory. 

Manual Node Manager Setup: If you select this option, creation of the Node Manager configuration for the domain is skipped, and you must manually create and update the Node Manager configuration for the domain.

Node Manager Credentials: Here you enter the username and password for this Node Manager instance.



After the wizard exits, we will have the following folder structure and the Node Manager related configuration files. 

Please remember you can still use Per Host Node Manager (scripts are located in WL_HOME\server\bin). However there is extra step you must take to use this model. Below is the summary of this steps;

1. Create a nodemanager.domains file that specifies the domains that you want this Node Manager instance to control, under      ORACLE_HOME\oracle_common\common\nodemanager, the per host NodeManagerHome location.

2. Generate a certificate and private key to communicate with Node manager over SSL














Reference : -  https://blogs.oracle.com