Monday, October 31, 2011

Apply weblogic Patch to unix

January 2011 weblogic patches are available at
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=REFERENCE&id=1263333.1

( Note: If you're wondering about  what "No Error Correction (NEC)" is: it means if you find an issue on WLS-10.3.1,there will be no fix provided, the fix will be provided only for WLS-10.3.2 onwards)

Copy all patches along with the patch-catalog.xml file to the Unix box at
*/bea1033/utils/bsu/cache_dir

now if the patch comes with an xml which is like  patch-catalog_xxxx.xml (ex : patch-catalog_4444.xml) then you would have to rename this  patch-catalog_xxxx.xml to  patch-catalog.xml in cache_dir
make sure that if a file patch-catalog.xml is already present in cache_dir before you dropping the patch there
you would have to back it up first and then rename patch-catalog-xxxx.xml to patch-catalog.xml

On the Unix machine go to the bsu folder.
( Ex : */bea1033/utils/bsu/cache_dir ) and run the following command :

Syntax :
$ ./bsu.sh -prod_dir= -patchlist= -verbose -install -log=/tmp/error.log

ex:
$ ./bsu.sh -prod_dir=*/bea1033/wlserver_10.3 -patchlist=B1WK -verbose -install -log=/tmp/error.log

If you want to install multiple patches at the time use the below command :

$ ./bsu.sh -prod_dir=*/bea1033/wlserver_10.3 -patchlist=B1WK,P2MT -verbose -install -log=/tmp/error.log


You can later use the below command to check the output

*\bea1033\utils\bsu>bsu -report


restart domain

To remove a patch

On the Solaris machine go to the bsu folder. ( Ex : */bea1033/utils/bsu ) and run the following command :

bsu -remove -patchlist=4MHU -prod_dir=D:\bea\weblogic92 –verbose

If you get the error:
"Patch id **** is not associated with the given product dir."
Then the patch does not belong to the WLS version you are in, most likely bug for the patch has already been fixed in the current version.

If you get the below error:
com.bea.plateng.common.util.logging.LogWriter -  java.io.IOException: Unable to backup file D:\work\wls\patch_wls1033\patch_jars\BUG*.jar to D:\work\wls\patch_wls1033\patch_jars\BUG*.jar53888.bak
com.bea.plateng.patch.CommandLinePatchInstaller - An unexpected error was encountered removing patch DFYK.  That resource may be busy.
The patch was not removed, and has been restored to its original state.  For further information, enable logging and run patch removal again.
com.bea.plateng.patch.PatchRemovalException: java.io.IOException: Unable to backup file D:\work\wls\patch_wls1033\patch_jars\BUG*.jar to D:\work\wls\patch_wls1033\patch_jars\BUG*.jar53888.bak


The OS has the JAR locked,  So please kill all OS related weblogic processes like nodemanager and beasvc service.

 If you get the below error:

    2014-06-25 02:48:59,328 DEBUG [Main Thread] com.bea.plateng.common.util.logging.LogWriter - Restoring /data/XXX//wlserver_10.3/server/lib/schema/weblogic-domain-binding.jar from /XXXX/patch_wls1036/backup/backup.jar
    2014-06-25 02:48:59,332 ERROR [Main Thread] com.bea.plateng.patch.FilePatchRemover - Error restoring files from backup archive.
    2014-06-25 02:48:59,333 ERROR [Main Thread] com.bea.plateng.patch.PatchRemover - Error encountered removing patch.
    2014-06-25 02:48:59,335 DEBUG [Main Thread] com.bea.plateng.patch.CommandLineProgress - Command line progress stopped
    2014-06-25 02:48:59,335 DEBUG [Main Thread] com.bea.plateng.common.util.logging.LogWriter - Result: Failure
    2014-06-25 02:48:59,335 DEBUG [Main Thread] com.bea.plateng.common.util.logging.LogWriter - Failure condition follows:

The patch was not removed, and has been restored to its original state.  For further information, enable logging and run patch removal again.
com.bea.plateng.patch.PatchRemovalException: java.io.FileNotFoundException: /XXX/wlserver_10.3/server/lib/schema/weblogic-domain-binding.jar (No such file or directory)

 while patching being rolled back, its looking for jar file in wrong location.

bash-3.2$ grep -i /XXXX/wlserver_10.3/server/lib/schema/weblogic-domain-binding.jar patch-backup.xml
   <target>/XXXX/wlserver_10.3/server/lib/schema/weblogic-domain-binding.jar</target>
   <target>/XXXX/wlserver_10.3/server/lib/schema/weblogic-domain-binding.jar</target>

 

2 comments:

Anonymous said...

Thanks for this post. I was facing the 'error backing up' issue on windows 7 and killed the processes you mentioned and it worked.

Anonymous said...

Thanks a lot.

Was struggling with the backup failed error. Killing beasvc.exe did the trick.

Thanks,
Sai