Sitedetout - Tutoriels informatiques

Application des patchs weblogic avec OPatch

Aujourd’hui, le nombre de vulnérabilités des systèmes informatiques découvertes par jour ne cesse d’augmenter menaçant ainsi les infrastructures des entreprises. Pour vous protéger, vous devez établir une stratégie de sécurité maitrisée et organisée dont la gestion des patchs devra avoir une grande importance.

Patcher un système consiste à réparer une ou plusieurs de ses vulnérabilités découvertes entravant ainsi leur exploitation. Un patch peut concerner tout composant du système d’information, c’est le cas des routeurs, serveurs Linux/UNIX, pare-feux, ERP utilisés … et c’est aussi le cas des produits Oracle comme le serveur Oracle Weblogic qui fait l’objet de ce tutoriel.

Depuis la version Weblogic 12.2.1.1, la gestion des patchs se fait à travers l’utilitaire JAVA appelé OPatch qui a remplacé BSU. OPatch est inclut dans l’installation Weblogic.

Types de patch Weblogic

Oracle fourni plusieurs types de patchs à savoir :

  • Interim Patch : Connu aussi sous les noms PSE/one-off/Hotfix, est un patch intermédiaire destiné à corriger un bug bien spécifique.
  • CPU : C’est une collection de patchs publiée chaque trimestre et destinée à corriger un ou plusieurs problèmes de sécurité. les CPU font objet d’un bulletin de sécurité publié chaque trimestre. Si avant la publication du prochain CPU, un bug de sécurité jugé très critique est trouvé, alors ce dernier fera l’objet d’une alerte de sécurité et sera corrigé et publié en avance dans un patch intermédiaire (Voir le lien suivant) .
  • PSU : C’est une collection de patchs publiée chaque trimestres par Oracle et qui a pour but de corriger plusieurs bugs et anomalies. Chaque nouveau PSU inclut les anciens PSU ainsi que les différents CPU et Patchs intermédiaires existants.

Quel PSU devrais-je installer ?

Les PSU sont cumulatifs, cela veut dire que le PSU d’Avril inclura les corrections du PSU de Janvier. Autrement aussi, si vous êtes en Décembre et que vous avez rater les anciens PSU, vous pouvez installer directement le PSU de Octobre.

Vérification des patchs installés

Il existe différentes manières pour lister les patchs installés sur un serveur weblogic. La plus simple est de les consulter directement depuis la console weblogic sous l’onglet : Environnement > Servers > serveur admin > Monitoring > General

image console

On peut aussi utiliser l’utilitaire Opatch comme suit :

[[email protected] OPatch]$ cd /u01/oracle/weblogic_12.2.1.3/OPatch
[[email protected] OPatch]$ ./opatch lsinv -jre /u01/oracle/weblogic_12.2.1.3/jdk/

Oracle Interim Patch Installer version 13.9.4.2.0
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/weblogic_12.2.1.3
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/weblogic_12.2.1.3/oraInst.loc
OPatch version    : 13.9.4.2.0
OUI version       : 13.9.4.0.0
Log file location : /u01/oracle/weblogic_12.2.1.3/cfgtoollogs/opatch/opatch2019-05-16_11-08-42AM_1.log


OPatch detects the Middleware Home as "/u01/oracle/weblogic_12.2.1.3"

Lsinventory Output file location : /u01/oracle/weblogic_12.2.1.3/cfgtoollogs/opatch/lsinv/lsinventory2019-05-16_11-08-42AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: localhost
ARU platform id: 226
ARU platform description:: Linux x86-64


Interim patches (5) :

Patch  27342434     : applied on Mon May 06 11:38:34 CEST 2019
Unique Patch ID:  21933966
Patch description:  "WLS PATCH SET UPDATE 12.2.1.3.180417"
   Created on 9 Mar 2018, 19:26:36 hrs PST8PDT
   Bugs fixed:
     26080417, 26985581, 26248394, 26936500, 26473149, 26144830, 25993295
     25800186, 26828499, 26806438, 23103220, 26439373, 25665727, 26608537
     26929163, 27111664, 26589850, 26547016, 26835012, 27117282, 26731253
     25750303, 27055227, 27272911, 27118731, 27131483, 25987400

Patch  26355633     : applied on Mon May 06 11:37:11 CEST 2019
Unique Patch ID:  21447583
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:40:20 hrs UTC
   Bugs fixed:
     26355633

Patch  26287183     : applied on Mon May 06 11:37:01 CEST 2019
Unique Patch ID:  21447582
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:41:27 hrs UTC
   Bugs fixed:
     26287183

Patch  26261906     : applied on Mon May 06 11:36:43 CEST 2019
Unique Patch ID:  21344506
Patch description:  "One-off"
   Created on 12 Jun 2017, 23:36:08 hrs UTC
   Bugs fixed:
     25559137, 25232931, 24811916

Patch  26051289     : applied on Mon May 06 11:36:38 CEST 2019
Unique Patch ID:  21455037
Patch description:  "One-off"
   Created on 31 Jul 2017, 22:11:57 hrs UTC
   Bugs fixed:
     26051289

--------------------------------------------------------------------------------

OPatch succeeded.

On voit bien qu’on a un PSU (27342434) et quatre patchs intermédiaires. (26355633, 26287183, 26261906 et 26051289).

La liste des bugs corrigés dans un patch ou un PSU peut être obtenue comme suit :

[[email protected] OPatch]$ ./opatch lsinv -bugs_fixed -jre /u01/oracle/weblogic_12.2.1.3/jdk/ | grep 27342434
23103220   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 23103220
25665727   27342434  Mon May 06 11:38:34 CEST 2019  ADMIN SERVER IS CONSUMING HIGH NATIVE MEMORY
25750303   27342434  Mon May 06 11:38:34 CEST 2019  COMMONDOMAIN WC_COLLABORATION=RUNNING,HEALTH_NULL
25800186   27342434  Mon May 06 11:38:34 CEST 2019  RESPONSE TIME FOR ADF APPLICATION TAKES 30 SECONDS
25987400   27342434  Mon May 06 11:38:34 CEST 2019  CUSTOM CHANNEL NOT USED FOR TX PEEREXCHANGE AND RE
25993295   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 25993295
26080417   27342434  Mon May 06 11:38:34 CEST 2019  WLS SENT 0000 DATA TO THE CLIENT AFTER HTTP 204
26144830   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 26144830
26248394   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 26248394
26439373   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 26439373
26473149   27342434  Mon May 06 11:38:34 CEST 2019  JSP COMPILING ERROR AFTER DEPLOYING FROM NETWORK
26547016   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 26547016
26589850   27342434  Mon May 06 11:38:34 CEST 2019  IMPROVE DOMAINRUNTIME.GETSERVERRUNTIME() PERFORMAN
26608537   27342434  Mon May 06 11:38:34 CEST 2019  Fix for Bug 26608537
26731253   27342434  Mon May 06 11:38:34 CEST 2019  UNEXPECTED EXCEPTION FOR IDENTITYASSERTER DURING D
26806438   27342434  Mon May 06 11:38:34 CEST 2019  NULLPOINTEREXCEPTION RAISED DURING INITIALIZATON
26828499   27342434  Mon May 06 11:38:34 CEST 2019  WLS REWRITES HOST HEADER WHEN CLUSTER FRONTEND
26835012   27342434  Mon May 06 11:38:34 CEST 2019  UPG-20170919 GSI EBNN-TEST WC_SPACES FAILS TO
26929163   27342434  Mon May 06 11:38:34 CEST 2019  _WLS SCHEMAS WITH CREATE ANY PRIVS
26936500   27342434  Mon May 06 11:38:34 CEST 2019  12C SMC SHARED LIBRARY DEPLOYMENT FAILS WITH
26985581   27342434  Mon May 06 11:38:34 CEST 2019  WLS PATCH SET UPDATE 12.1.3.0.171017 THROWING STRI
27055227   27342434  Mon May 06 11:38:34 CEST 2019  TRACKING BUG FOR DIAGNOSTIC PATCH OF IDCS
27111664   27342434  Mon May 06 11:38:34 CEST 2019  TRACKING BUG TO CONSUME JRF WEBSERVICES FIXES FOR
27117282   27342434  Mon May 06 11:38:34 CEST 2019  CERTGEN FAILS WITH JDK8 CPU (180161, B04, B05, B06
27118731   27342434  Mon May 06 11:38:34 CEST 2019  TYPO IN SECURITY DEBUG LOGGING FOR WORD 'CALLBACKS
27131483   27342434  Mon May 06 11:38:34 CEST 2019  INVALID COMMIT/ABORT DEBUG FOR LOGINMODULE
27272911   27342434  Mon May 06 11:38:34 CEST 2019  REQUEST FOR ALTERNATIVE SOLUTION/API FOR JAVAURLCO

Récupérer les patchs à installer

Pour récupérer les patchs à installer, vous devez avoir un compte de support oracle. Pour cela, il faudra se connecter sur http://support.oracle.com/ puis cliquez sur le lien Patches & Updates et choisissez votre produit et sa version.

Si vous souhaitez par contre récupérer le dernier PSU publié, référez-vous à la page suivante : PSU Weblogic

Installation d’un patch

Récupérez et décompressez le patch puis déplacez vous dans le répertoire généré.

[[email protected] tmp]$ unzip p29016089_122130_Generic.zip

[[email protected] tmp]$ cd 29016089/ [[email protected] 29016089]$ /u01/oracle/weblogic_12.2.1.3/OPatch/opatch apply -jre /u01/oracle/weblogic_12.2.1.3/jdk/ Oracle Interim Patch Installer version 13.9.4.2.0 Copyright (c) 2019, Oracle Corporation. All rights reserved. Oracle Home : /u01/oracle/weblogic_12.2.1.3 Central Inventory : /u01/oracle/oraInventory from : /u01/oracle/weblogic_12.2.1.3/oraInst.loc OPatch version : 13.9.4.2.0 OUI version : 13.9.4.0.0 Log file location : /u01/oracle/weblogic_12.2.1.3/cfgtoollogs/opatch/opatch2019-05-16_12-20-01PM_1.log OPatch detects the Middleware Home as "/u01/oracle/weblogic_12.2.1.3" Verifying environment and performing prerequisite checks... OPatch continues with these patches: 29016089 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/oracle/weblogic_12.2.1.3') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '29016089' to OH '/opt/oracle/weblogic_12.2.1.3' ApplySession: Optional component(s) [ oracle.wls.cam.wlst, 12.2.1.3.0 ] , [ oracle.wls.cam.wlst, 12.2.1.3.0 ] , [ oracle.webservices.wls.jaxrpc, 12.2.1.3.0 ] , [ oracle.webservices.wls.jaxrpc, 12.2.1.3.0 ] , [ oracle.webservices.jrf, 12.2.1.3.0 ] , [ oracle.webservices.jrf, 12.2.1.3.0 ] , [ oracle.fmwconfig.common.wls.shared, 12.2.1.3.0 ] , [ oracle.wls.core.app.server.nativelib, 12.2.1.3.0 ] , [ oracle.jrf.tenancy.se, 12.2.1.3.0 ] , [ oracle.wls.server.examples, 12.2.1.3.0 ] , [ oracle.wls.rdmu, 12.2.1.3.0 ] , [ oracle.legacy_oc4j_xml_schemas, 12.2.1.3.0 ] , [ oracle.wls.server.mt.examples, 12.2.1.3.0 ] , [ oracle.jrf.tenancy.ee, 12.2.1.3.0 ] , [ oracle.jrf.tenancy, 12.2.1.3.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.webservices.orawsdl, 12.2.1.3.0... Patching component oracle.webservices.orawsdl, 12.2.1.3.0... Patching component oracle.com.fasterxml.jackson.dataformat.jackson.dataformat.xml, 2.7.9.0.0... Patching component oracle.com.fasterxml.jackson.dataformat.jackson.dataformat.xml, 2.7.9.0.0... Patching component oracle.org.bouncycastle, 12.2.1.3.0... Patching component oracle.org.bouncycastle, 12.2.1.3.0... Patching component oracle.wls.jrf.tenancy.common.sharedlib, 12.2.1.3.0... ................. ................. ................. Patching component oracle.wls.weblogic.sca, 12.2.1.3.0... Patching component org.codehaus.woodstox, 4.2.0.0.0... Patching component oracle.wls.core.app.server.tier1nativelib, 12.2.1.3.0... Patching component oracle.java.jaxws, 12.2.1.3.0... Patch 29016089 successfully applied. Sub-set patch [27342434] has become inactive due to the application of a super-set patch [29016089]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/oracle/weblogic_12.2.1.3/cfgtoollogs/opatch/opatch2019-05-16_12-20-01PM_1.log OPatch succeeded.

La phrase en rouge explique bien que le PSU 27342434 a été désactivé puisqu’il est inclut dans le nouveau PSU 29016089.

Désinstallation d’un PSU


[[email protected] OPatch]$ /u01/oracle/weblogic_12.2.1.3/OPatch/opatch rollback -id 29016089 -jre /u01/oracle/weblogic_12.2.1.3/jdk
Oracle Interim Patch Installer version 13.9.4.2.0
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/oracle/weblogic_12.2.1.3
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/weblogic_12.2.1.3/oraInst.loc
OPatch version    : 13.9.4.2.0
OUI version       : 13.9.4.0.0
Log file location : /u01/oracle/weblogic_12.2.1.3/cfgtoollogs/opatch/opatch2019-05-16_15-11-03PM_1.log

OPatch detects the Middleware Home as "/u01/oracle/weblogic_12.2.1.3"

Patches will be rolled back in the following order:
   29016089
The following patch(es) will be rolled back: 29016089

.............
.............
.............

Patching component oracle.java.jaxws, 12.2.1.3.0...
RollbackSession removing interim patch '29016089' from inventory
Inactive sub-set patch [27342434] has become active due to the rolling back of a super-set patch [29016089].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/oracle/weblogic_12.2.1.3/cfgtoollogs/opatch/opatch2019-05-16_15-11-03PM_1.log

OPatch succeeded.

Référence : https://docs.oracle.com/cd/B28359_01/em.111/b31207/oui7_opatch.htm#CEGCJGJD


Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.

Menu Title
Chargement...

Powered by sitedetout.com