Patch Management Using Patching Utility

Use the patching utility tool in Oracle WebLogic Server for OKE to list and download the patches, and view the patching tool version and upgrade the patching tool.

To apply the patches, see Apply a WebLogic Server Patch.

You can perform the following tasks using the patching utility tool:

Note:

If you want to use some of the new features, which were added to the patching utility tool in December 14, 2022, for your existing Oracle WebLogic Server for OKE instances (created before December 14, 2022), then ensure that you upgrade the patching tool. See Upgrade Patching Tool.

View Patching Tool Version

Use the patching tool to view the build version along with the Oracle license and copyright information.

  1. Connect to the Administration Server node as the opc user.
    The SSH command format is:
    ssh -i path_to_private_key opc@admin_ip
  2. Print the build version.
    patch-utils -v
    Sample output:
    Weblogic Cloud Patch-Utils <Patch version number>)
    Copyright (c) 2020, Oracle Corporation and/or its affiliates.Licensed under the Universal Permissive License v 1.0 as shown at
    https://oss.oracle.com/licenses/upl.

Configure Initial Setup

Use the patching tool to configure the region from where to download the patches and create the configuration file in the specified Middleware Home.

Currently, the regions: us-phoenix-1, us-ashburn-1, eu-frankfurt-1, ap-mumbai-1, ap-tokyo-1, and sa-saopaulo-1 are supported.

Note:

You must set up the configuration before you run the patching tool on any provisioned VM.
  1. Connect to the Administration Server node as the opc user.
    The SSH command format is:
    ssh -i path_to_private_key opc@admin_ip
  2. Set up the configuration.
    patch-utils setup
    Sample output:
    Enter middleware home (default: /u01/app/oracle/middleware):
    Choose oci region for patch download
    ['us-ashburn-1', 'eu-frankfurt-1', 'ap-mumbai-1', 'ap-tokyo-1', 'us-phoenix-1', 'sa-saopaulo-1']: us-phoenix-1
    Created config file [/home/opc/.patchutils/config]

List Patches

Use the patching tool to list all the available patches in the patch catalog. You can also list current patches and latest patches that are available in the patching tool repository.

Note:

You must set up the configuration file before running the patch-utils list command. See Configure Initial Setup.
  1. Connect to the Administration Server node as the opc user.
    The SSH command format is:
    ssh -i path_to_private_key opc@admin_ip
  2. Run the following commands to list patches:
    • List all patches in the patch catalog for the applicable WebLogic Server version.
      patch-utils list

      Sample output:

      <Patch number> ADF Bundle Patch for Bug: <Bug number>, WLS version: <WLS version number>
      <Patch number> OPSS Patch Bundle Patch for Bug:<Bug number>, WLS version: <WLS version number>
      <Patch number> PATCH <Patch number>- OPATCH <OPatch version number>FOR FMW/WLS <WLS version number>AND <WLS version number>
      <Patch number> Oracle Coherence Patch Bundle Patch for Bug:<Bug number>, WLS version: <WLS version number>
      <Patch number>Weblogic Service Patch Bundle Patch for Bug:<Bug number>, WLS version: <WLS version number>
      
    • List all the current patches based on OPatch utility for 12c.
      patch-utils list -a

      Sample output:

      Listing current patches
      Oracle Interim Patch Installer version <Patch version number>)
      Copyright (c) 2020, Oracle Corporation. All rights reserved
      Oracle Home : /u01/app/oracle/middleware 
      Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/middleware/oraInst.loc
      OPatch version : <OPatch Version number>
      OUI version : <OUI Version number>
      Log file location : /u01/app/oracle/middleware/cfgtoollogs/opatch/<opatchtimestamp>.log 
      OPatch detects the Middleware Home as "/u01/app/oracle/middleware" 
      Lsinventory Output file location : /u01/app/oracle/middleware/cfgtoollogs/opatch/lsinv/<lsinventoryopatchtimestamp>.txt
      Local Machine Information:
      Hostname: testwls-wls-0.wlssubnet.subnet1.oraclevcn.com
      ARU platform id: <ID number>
      ARU platform description:: Linux x86-64
      Interim patches (1):
      Patch <WebLogic 12c version number>: applied on <day month date time>
      Unique Patch ID: <Patch ID number>
      Patch description: "Bundle patch for Oracle Coherence Version <WebLogic 12c version number>"
      Created on <date month year time>
      Bugs fixed:<Bug number>
      OPatch succeeded.
    • List the latest patches and other component patches for the relevant WebLogic Server version, from the available patches in catalog.

      In case of multiple Middleware Homes for WebLogic Server compute instances,, you can use the patch-utils setup command to change the Middleware Home.

      patch-utils list -L

      Sample output on the WebLogic Server compute instance:

      Patch Id           Description
      ----------         ---------------------------------------------------------------------------
      <Patch number>    FMW Thirdparty Bundle Patch 12.2.1.4.220915
      <Patch number>    Opatch 13.9.4.2.11 for EM 13.4, 13.5 and FMW/WLS 12.2.1.3.0, 12.2.1.4.0 and 14.1.1.0.0
      <Patch number>    WLS Patch Set Update 12.2.1.4.220929
      <Patch number>    Merge Request on Top of 12.2.1.4.0 for Bugs <Bug number> <Bug number> <Bug number>  <Bug number>
      <Patch number>    Coherence 12.2.1.4 Cumulative Patch 15 (12.2.1.4.15)
      

      Sample output on the administration instance:

      Choose wls type ['WLS', 'FusionMiddleware', 'Coherence', 'Forms', 'Database'] (default: ALL): 
      	  
      Patch Id           Description
      ----------         ---------------------------------------------------------------------------
      <Patch number>    FMW Thirdparty Bundle Patch 12.2.1.4.220915
      <Patch number>    Opatch 13.9.4.2.11 for EM 13.4, 13.5 and FMW/WLS 12.2.1.3.0, 12.2.1.4.0 and 14.1.1.0.0
      <Patch number>    WLS Patch Set Update 12.2.1.4.220929
      <Patch number>    Merge Request on Top of 12.2.1.4.0 for Bugs <Bug number> <Bug number> <Bug number> <Bug number>
      <Patch number>    Coherence 12.2.1.4 Cumulative Patch 15 (12.2.1.4.15)

View Patch Details

Use the patching tool to view information of the specified patch.

The WebLogic Server patches include the readme file that provides the patch details and other useful information about patching.

  1. Connect to the Administration Server node as the opc user.
    The SSH command format is:
    ssh -i path_to_private_key opc@admin_ip
  2. View the information for the selected patch.
    patch-utils info -i <Patch ID>

    By default, the first ten lines of the readme.txt file is displayed.

    Sample output:
    Patch Set Update (PSU) for Bug: <Bug number>
    Date: Fri Feb 28 17:33:37 2020
    Platform Patch for : Generic
    Product Patched : ORACLE WEBLOGIC SERVER
    Product Version : <WLS version number>
    This document describes how to install patch for bug # 31985811.It includes the following sections:
    Section 1: Known Issues
    .......
    more
    ....

    You can define the number of lines to be displayed using the -l parameter.

    For example, to print 25 lines, run the following command:
    patch-utils info -i <Patch ID> -n 25
    

Download Patches

Use the patching tool to download the patches to the specified location.

You can download the patches if NAT gateway is configured. However, if you provision an instance in a private subnet without a bastion (without NAT gateway), you must create a temporary bastion instance in the Oracle Cloud Infrastructure console, and then use the patching tool to download the patches on the bastion host. The patches are encrypted and can only be applied on the WebLogic Server VMs using the patching utility tool.

  1. Connect to the Administration Server node as the opc user.
    The SSH command format is:
    ssh -i path_to_private_key opc@admin_ip
  2. Run the following commands to download patches:
    • Download latest patches.
      patch-utils download -L -p /tmp/<Location to download>
      Sample output:
      Successfully downloaded following patches.
      Please copy them to weblogic hosts and apply them locally.['<Patch ID_Generic.zip']
    • Download patches using patch ID.
      Sample output:
      patch-utils download -l <Patch ID> -p /tmp/<Location to download>

      Note:

      To download multiple patches, specify the patch IDs as comma separated values. Make sure to download the patches to an accessible location.
      Sample output:
      Successfully downloaded following patches.
      Please copy them to weblogic hosts and apply them locally.['<Patch ID_Generic.zip']

Upgrade Patching Tool

Use the patching tool to upgrade the patching tool utility to the latest version.

  1. Connect to the Administration Server node as the opc user.
    The SSH command format is:
    ssh -i path_to_private_key opc@admin_ip
  2. Upgrade patch-utils to the latest version.
    patch-utils upgrade

    Note:

    This command is used to upgrade VMs if the NAT Gateway is enabled on the WebLogic Server subnet.
    Sample output:
    Successfully updated patch-utils to [<Patch Utils version number>]. Please rerun patch-utils.