Friday, March 19, 2021

Use adop to apply AD & TXK patches, and R12.2.10 patch

Steps in Doc ID 1617461.1 (Applying the Latest AD and TXK Release Update Packs to Oracle E-Business Suite Release 12.2) using ADOP and to complete R12.2.10 upgrade.

1). Checked database parameters for R12.2 (Doc ID: 396009.1) in 12c database:
SQL>  select SERVICE_ID,NAME from dba_services where name='ebs_patch';
SERVICE_ID NAME
---------- ------------------------
         8 ebs_patch

SQL> show parameter recyclebin
NAME                               TYPE        VALUE
-------------------------------- ----------- ------------
recyclebin                           string        OFF

SQL> show parameter _SYSTEM_TRIG_ENABLED
NAME                            TYPE       VALUE
----------------------------- ----------- ------------
_system_trig_enabled     boolean     TRUE

SQL> show parameter optimizer_adaptive_features
NAME                                      TYPE      VALUE
------------------------------------ ----------- --------------
optimizer_adaptive_features    boolean     FALSE

SQL> show parameter _disable_actualization_for_grant
NAME                                            TYPE        VALUE
------------------------------------------ ----------- ----------------
_disable_actualization_for_grant     boolean     TRUE

SQL> select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
FND_PROFILE.VALUE('APPS_MAINTENANCE_MODE')
--------------------------------------------------------------------------
NORMAL

SQL> set lines 333 pages 123;
col ABBREVIATION for a12;
col NAME for a45;
col codelevel for a12;
SQL> select  ABBREVIATION, NAME, codelevel FROM AD_TRACKABLE_ENTITIES 
where abbreviation in ('txk','ad');
ABBREVIATION   NAME                                  CODELEVEL
------------ --------------------------------------------- ------------
ad           Applications DBA                                       C
txk         Oracle Applications Technology Stack        C

SQL> select node_name from apps.fnd_nodes;
NODE_NAME
------------------------------
db_nodename
AUTHENTICATION
apps_nodename

SQL> select node_name from apps.TXK_TCC_RESULTS;
NODE_NAME
------------------------------------------------------------------------
db_nodename.domain_name.com         
                         <== Should have db_nodename only
                         <== Not sure, but July 2020 db PSU 31113348 may fix the issue

$ grep s_dbhost $CONTEXT_FILE
         <dbhost oa_var="s_dbhost">db_nodename</dbhost>       <== mis-match

2). run checkDBpatch.sh
3). run checkMTpatch.sh 
$ . $APPL_TOP/APPS$CONTEXT_NAME.env       <= Source the env file
$ echo $FILE_EDITION
run
$ echo $RUN_BASE
/u02/app/$TWO_TASK/fs1

$ ./checkMTpatch.sh

Notes: without 2) and 3),  later ADOP may report error even two scripts were previously executed:
Validating system setup.
    Node registry is valid.
    [ERROR]     ETCC not run in the database node db_nodename
                The EBS Technology Codelevel Checker needs to be run on the database node.
                It is available as Patch 17537119.
    [WARNING]   MTCC has not been run. Apply Patch 17537119 and run checkMTpatch.sh.
    Encountered the above errors when performing database validations.
    Resolve the above errors and restart adop.
If the issue is persistent, check a solution in Doc ID 2191678.1
SQL> select node_name from apps.TXK_TCC_RESULTS;

4). Start WebLogic Admin Server
$ sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start
NMProcess: <Mn 7, 2021 4:47:14 PM> <INFO> <Loading domains file: $FMW_Home/wlserver_10.3/common/nodemanager/nmHome1/nodemanager.domains>
NMProcess: Mn 07, 2021 4:47:14 PM weblogic.nodemanager.server.NMServerConfig initDomainsMap
NMProcess: INFO: Loading domains file: $FMW_Home/wlserver_10.3/common/nodemanager/nmHome1/nodemanager.domains
NMProcess: <Mn 7, 2021 4:47:14 PM> <INFO> <Loaded node manager configuration properties from '$FMW_Home/wlserver_10.3/common/nodemanager/nmHome1/nodemanager.properties'>
NMProcess: Mn 07, 2021 4:47:14 PM weblogic.nodemanager.server.NMServer <init>
NMProcess: INFO: Loaded node manager configuration properties from '$FMW_Home/wlserver_10.3/common/nodemanager/nmHome1/nodemanager.properties'
NMProcess: Node manager v10.3
NMProcess:
NMProcess: Configuration settings:
... ...
adadminsrvctl.sh: exiting with status 0
adadminsrvctl.sh: check the logfile $LOG_HOME/appl/admin/log/adadminsrvctl.txt for more information ...

$ grep wls_admin $CONTEXT_FILE

5). Test WebLogic console works by login as "weblogic".
http://server_name.domain.com:s_wls_adminport/console
(After logged in, see "Warning: This server is not secure. Upgrade to Java 1.7.0_191 or higher.")

Below line shall also work:
$ wget http://server_name.domain.com:s_wls_adminport/console
… … 
100%[===============================>] 3,162       --.-K/s   in 0s
2021-Mn-12 10:25:54 (392 MB/s) - ‘console’ saved [3162/3162]

$ ps -ef | grep -i fs1 | wc -l
shall be 5 new sessions

Notes:  at this moment, environment variables PATCH_TOP and NE_BASE are not defined yet, and ADOP status gives error because it has no history yet:

$ adop -status

Enter the APPS username: apps
Enter the APPS password:
where adop_session_id=;
                      *
ERROR at line 6:
ORA-06550: line 6, column 23:
PL/SQL: ORA-00936: missing expression
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
adop exiting with status = 1 (Fail)

6). Download/copy patches' .zip files to 
$ cd /path/to/$TWO_TASK/fs_ne/EBSapps/patch
$ ls
$ unzip p30628681_R12.AD.C_R12_LINUX.zip

7). Run 30628681/admin/adgrants.sql as SYSDBA. 
(confirmed the same version was executed before and so skipped this step)

8). Apply patch 30628681   (Do not merge it with any other patches)
$ echo $RUN_BASE
/u02/app/$TWO_TASK/fs1
$ echo $FILE_EDITION
run
$ pwd
/path/to/$TWO_TASK/fs_ne/EBSapps/patch
$ adop phase=apply patches=30628681 hotpatch=yes patchtop=/path/to/$TWO_TASK/fs_ne/EBSapps/patch

Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:
 Please wait. Validating credentials...

Enter the RUN file system context file name [$RUN_BASE/inst/apps/$CONTEXT_NAME/appl/admin/$CONTEXT_NAME.xml]:
[STATEMENT] [END   2021/0X/12 11:53:01] Performing verification of parameters
[STATEMENT] [START 2021/0X/12 11:53:01] Checking for the required ENV setup
[STATEMENT] [END   2021/0X/12 11:53:01] Checking for the required ENV setup
************* Start of  session *************
 version: 12.2.0
 started at: Fri XXX 12 2021 11:53:02
… … 
[STATEMENT] ADPATCH Log directory: $NE_BASE/EBSapps/log/adop/2/apply_20210X12_115025/$CONTEXT_NAME/30628681/log
[STATEMENT] Running: adpatch  workers=24    options=hotpatch    flags=autoskip   console=no interactive=no  defaultsfile=$APPL_TOP/admin/$TWO_TASK/adalldefaults.txt patchtop=$NE_BASE/EBSapps/patch/30628681 driver=u30628681.drv logfile=u30628681.log stdin=yes

Successfully created out directory        <== stay here for about 10 minutes
                                                                      If it takes hours, something was wrong.
    [STATEMENT] [START 2021/09/14 13:32:57] Running finalize since in hotpatch mode
    [STATEMENT] [END   2021/09/14 13:36:22] Running finalize since in hotpatch mode
    [STATEMENT] [START 2021/09/14 13:36:23] Performing Automatic DB cutover
… … 
[STATEMENT] adop phase=apply - Completed Successfully
[STATEMENT] Log file: $NE_BASE/EBSapps/log/adop/2/adop_20210X12_115025.log
adop exiting with status = 0 (Success)

Check logs to confirm it had no issue. It takes about 15 minutes.

Notes: Found ADOP does not like SYSTEM password has special char "!" at the end, with error:
ERROR: Invalid system user credentials.
Warning: Your system may have a limit on the number of failed login attempts before the account is locked out.

9). Use hotpatch mode to apply Patch 30735865 (R12.TXK.C.Delta.12) plus any additional critical patches (which is patch 31904550:R12.TXK.C for addressing fs_clone issue. See Section 4.2). 

$ unzip p30735865_R12.TXK.C_R12_GENERIC.zip
$ unzip p31904550_R12.TXK.C_R12_GENERIC.zip
$ echo $RUN_BASE
/u02/app/$TWO_TASK/fs1

$ adop phase=apply patches=30735865,31904550 hotpatch=yes merge=yes patchtop=/path/to/$TWO_TASK/fs_ne/EBSapps/patch
Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:
Validating credentials.
Initializing.
    Run Edition context  : $CONTEXT_FILE
    Patch edition context: /path/to/fs2/inst/apps/…/$CONTEXT_NAME.xml
    Patch file system free space: 89.36 GB
Validating system setup.
    Node registry is valid.
    [WARNING]   MTCC has not been run. Apply Patch 17537119 and run checkMTpatch.sh.
Checking for existing adop sessions.
    Application tier services are down.
    Continuing with the existing session [Session ID: 2].
==============================================
ADOP (C.Delta.12)
Session ID: 2
Node: node_name
Phase: apply
Log: $NE_BASE/EBSapps/log/adop/2/20210X15_094233/adop.log
==============================================
Starting patch merge.
    Merging patches where applicable.
    Log: $NE_BASE/EBSapps/log/adop/2/20210X15_094233/apply/node_name/admrgpch.log
Applying patch ADOP_MRG_20210X15_1613400209:u_1809065289.drv.
    Log: $NE_BASE/EBSapps/log/adop/2/20210X15_094233/apply/node_name/ADOP_MRG_20210X15_1613400209/log/u_1809065289.log
        New product CMI spliced. Use FNDCPASS to change the password.
        New product YMS spliced. Use FNDCPASS to change the password.      
                                                                       <= it takes about 15 minutes after this line totally
Running finalize actions for the patches being applied.
    Log: @ADZDSHOWLOG.sql "2021/0X/15 09:54:40"
Running cutover actions for the patches being applied.
    Creating workers to process cutover DDL in parallel
    Log: $NE_BASE/EBSapps/log/adop/2/20210X15_094233/apply/node_name/log/cutover.log
    Performing database cutover in Quick mode
Generating post apply reports.
Generating log report.
    Output: $NE_BASE/EBSapps/log/adop/2/20210X15_094233/apply/node_name/adzdshowlog.out
The apply phase completed successfully.
adop exiting with status = 0 (Success)

$ egrep -i 'fail|error|ora-' u_xxx.log
$ egrep -i 'fail|error|ora-' 
$NE_BASE/EBSapps/log/adop/2/20210X15_094233/apply/node_name/adzdshowlog.out
It reports ORA- errors on material view MRP_COMPANY_USERS_SN. This error can be ignored per Doc ID 1957323.1.

Notes: if ETCC version was old and some databases patches were not applied, ADOP will give warnings, e.g.
    [WARNING]   ETCC: The following required database fixes have not been applied to node db_nodename:
                  21322448
                  22331786
                  31404014
                  31550110
                Refer to My Oracle Support Knowledge Document 1594274.1 for instructions.

10). Confirm all worked
$ adop -status
Enter the APPS password:
Connected.
==================================================
ADOP (C.Delta.12)
Session Id: 2
Command: status
Output: $NE_BASE/EBSapps/log/adop/2/20210X15_100245/adzdshowstatus.out
=============================================================
Node Name       Node Type  Phase           Status          Started              Finished             Elapsed
--------------- ---------- --------------- --------------- -------------------- -------------------- ------------
$EBS_HOSTNAME          master    APPLY          ACTIVE          2021/0X/12 11:53:31  2021/0X/15 09:56:28  70:02:57
                                                          FINALIZE     NOT STARTED
                                                          CLEANUP     NOT STARTED
File System Synchronization Type: None
adop exiting with status = 0 (Success)

Use query to confirm 3 patches were applied:
SQL> select ad_patch.is_patch_applied('R12',-1,30735865) from dual;
SQL> select ad_patch.is_patch_applied('R12',-1,31904550) from dual;
SQL> select ad_patch.is_patch_applied('R12',-1,30628681) from dual;


SQL> select ADOP_SESSION_ID, BUG_NUMBER, STATUS, APPLIED_FILE_SYSTEM_BASE, 
ADPATCH_OPTIONS, round((end_date-start_date)*24*60, 1) EXEC_TIME, AUTOCONFIG_STATUS,  DRIVER_FILE_NAME, NODE_NAME, 
END_DATE, CLONE_STATUS
from ad_adop_session_patches
order by end_date desc;
30735865
31904550
30628681

SQL> set lines 333 pages 123;
col ABBREVIATION for a12;
col NAME for a45;
col codelevel for a12;
SQL> select  ABBREVIATION, NAME, codelevel FROM AD_TRACKABLE_ENTITIES where abbreviation in ('txk','ad','fnd','fwk','atg_pf','icx');
ABBREVIATION NAME                                          CODELEVEL
------------ --------------------------------------------- ------------
ad             Applications DBA                                   C.12
atg_pf      Applications Technology                         C
fnd           Oracle Application Object Library           C
fwk          Applications Framework                          C
icx           Oracle iProcurement                               D
txk           Oracle Applications Technology Stack   C.12
6 rows selected.

SQL> select release_name from apps.fnd_product_groups;
RELEASE_NAME
------------------------------
12.2.0

SQL> select node_name from apps.fnd_nodes;
NODE_NAME
------------------------------
db_nodename
AUTHENTICATION
apps_nodename

SQL> col EDITION_NAME for a15;
col PARENT_EDITION_NAME for a20;
col USABLE for a10;
SQL> select * from dba_editions;
EDITION_NAME  PARENT_EDITION_NAME USABLE
----------------------- ------------------------------------- ----------
ORA$BASE                                                              YES

11). Activate the new env file
Now, in a new session, PATCH_TOP and NE_BASE are setup, and new env file EBSapps.env is created under /path/to/$TWO_TASK. Add below line to .profile (of Linux applmgr account), and then start a new OS session:
. /u02/app/$TWO_TASK/EBSapps.env RUN

12). Run autoconfig to update Database Tier to latest code (Section 5 of Doc ID 1617461.1)

$ ./checkMTpatch.sh
No new patches are asked by the script.

Stop Weblogic Server Admin Server:
$ sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh stop   
You are running adadminsrvctl.sh version 120.10.12020000.2
Enter the WebLogic Admin password:
Enter the APPS Schema password:
Stopping WLS Admin Server...
Refer $LOG_HOME/appl/admin/log/adadminsrvctl.txt for details
adadminsrvctl.sh: exiting with status 0

$ ps -ef | grep $LOGNAME

Stop WebLogic Server Node Manager service:
$ sh $ADMIN_SCRIPTS_HOME/adnodemgrctl.sh stop
You are running adnodemgrctl.sh version 120.11.12020000.4
Enter the WebLogic Admin password:
adnodemgrctl.sh: exiting with status 0
adnodemgrctl.sh: check the logfile $LOG_HOME/appl/admin/log/adnodemgrctl.txt for more information ...

$ ls -lrt $AD_TOP/bin/admkappsutil.pl
-rwxr-xr-x 1 user group 7232 Nov 24  2012 /u02/app/$TWO_TASK/fs1/EBSapps/appl/ad/12.0.0/bin/admkappsutil.pl
$ perl $AD_TOP/bin/admkappsutil.pl
Starting the generation of appsutil.zip
Log file located at $INST_TOP/admin/log/MakeAppsUtil_02151153.log
output located at $INST_TOP/admin/out/appsutil.zip
MakeAppsUtil completed successfully.

DBA to run adautocfg.sh on <RDBMS ORACLE_HOME> after unzip appsutil.zip.
a) Source the environment for RDBMS ORACLE_HOME
b) Uncompress appsutil.zip, under <RDBMS ORACLE_HOME>.
c) Run AutoConfig on <RDBMS ORACLE_HOME>
 $ sh <RDBMS_ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>/adautocfg.sh

13) Run autoconfig on Apps node, After autoconfig completed on database node:
$ echo $FILE_EDITION
run
$ cd $ADMIN_SCRIPTS_HOME
$ ./adautocfg.sh
… … 
AutoConfig completed successfully.

SQL> select node_name from apps.fnd_nodes;
NODE_NAME
------------------------------
db_nodename
AUTHENTICATION
apps_nodename

14) Run ADSplice to create CUSTOM TOPs. Steps are in Doc ID 1577707.1 (Creating a Custom Application in Oracle E-Business Suite Release 12.2). 
SQL> select * from FND_OAM_CONTEXT_CUSTOM;
no row returned 

$ cd $APPL_TOP/admin
$ copy .txt files to here (from an instance where adsplice worked)
$ adsplice
... ...
If you added new products, use FNDCPASS to change their default passwords.
AD Splicer is complete.
Errors and warnings are listed in the log file $APPL_TOP/admin/$TWO_TASK/log/adsplice.log
and in other log files in the same directory.

New entries shall show up in below queries:
SQL> select * from FND_OAM_CONTEXT_CUSTOM;

SQL> select fav.application_id APPL_ID, fav.application_short_name app_short_name, fav.basepath, fav.application_name,
decode(fpi.status,'I','Installed','S','Shared','N','No', fpi.status) inst_status,  fpi.product_version,  
nvl(fpi.patch_level, 'Not Available') patchset, fpi.oracle_id
from apps.fnd_application_vl fav, apps.fnd_product_installations fpi  
where fav.application_id = fpi.application_id 
order by app_short_name asc;

Backup Apps file system & database (Recommended)

15). Applied RUP (Release Update Pack - R12.2.10) patch 30399999 (See Doc ID 2666934.1) 

a) download 11 .zip files from patch 30399999 to folder /path/to/R12_2_10
b) run "$ unzip unzip p30399999_R12_LINUX_Xof11.zip" on each of 11 zip files
c) copy software to $PATCH_TOP
    $ cd $PATCH_TOP
    $ cp -rp /path/to/R12_2_10/30399999 .
    $ du -sk 30399999
       12981020        30399999
Notes: patching process unzipped some files in the installation software folder. After it is applied:
    $ du -sk 30399999
      21489484        30399999
d) confirm nothing is running on Apps node.
     $ ps -ef | grep $LOGNAME

e) Apply patch 30399999
$ echo $FILE_EDITION
   run
$ adop phase=apply apply_mode=downtime patches=30399999 patchtop=/path/to/PATCH_TOP
                                                                 <== It takes almost 7 hours
Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:
Validating credentials.
Initializing.
    Run Edition context  : $CONTEXT_FILE
    Patch edition context: $CONTEXT_FILE on /fs2/
    Patch file system free space: 76.62 GB
Validating system setup.
    Node registry is valid.
Checking for existing adop sessions.
    Application tier services are down.
    Continuing with the existing session [Session ID: 2].
========================================================
ADOP (C.Delta.12)
Session ID: 2
Node: node_name
Phase: apply
Log: $NE_BASE/EBSapps/log/adop/2/20210X16_155144/adop.log
========================================================
Applying patch 30399999.
    Log: $NE_BASE/EBSapps/log/adop/2/20210X16_155144/apply/node_name/30399999/log/u30399999.log
                  <== It takes upto 7 hours. adctrl can be used to check workers.
                          After about two hour, it runs adutlrcmp.sql for about 30 minutes.
                          After about 4 hours, it re-runs adutlrcmp.sql for about 20 minutes
Running finalize actions for the patches being applied.
    Log: @ADZDSHOWLOG.sql "2021/0X/16 20:55:04"
Running cutover actions for the patches being applied.
    Creating workers to process cutover DDL in parallel
    Log: $NE_BASE/EBSapps/log/adop/2/20210X16_155144/apply/node_name/log/cutover.log
    Performing database cutover in Quick mode
Generating post apply reports.
Generating log report.
    Output: $NE_BASE/EBSapps/log/adop/2/20210X16_155144/apply/node_name/adzdshowlog.out
The apply phase completed successfully.
adop exiting with status = 0 (Success)

$ adopscanlog -latest=yes              <== its message is not easy to read!

SQL> select release_name from apps.fnd_product_groups;
RELEASE_NAME
------------------------------
12.2.10

SQL> set lines 333 pages 123;
col owner for a27
col object_name for a45;
col object_typr for a27;
SQL> select owner,object_type,count(*) from dba_objects where status <> 'VALID'
group by owner,object_type order by owner, object_type;

OWNER                       OBJECT_TYPE            COUNT(*)
--------------------------- ----------------------------- ----------
APPS                        PACKAGE                          1
APPS                        PACKAGE BODY              19
APPS                        PROCEDURE                     2
APPS                        VIEW                                  7
APPS_NE                 TYPE BODY                      2
PUBLIC                    SYNONYM                       4181
... ... ... 

SQL> select * from dba_editions;
return one line.

Verify and confirm below 4 important patches were applied:

SQL> SELECT adb.bug_number, adb.creation_date, 
ad_patch.is_patch_applied('R12',-1, adb.bug_number) status
FROM ad_bugs adb
WHERE adb.bug_number in ('30628681', '30735865', '30399994', '30399999');
BUG_NUMBER CREATION_DATE STATUS
--------------------- ----------------------- -----------
30399994   16-FEB-21  EXPLICIT
30399999   16-FEB-21  EXPLICIT
30628681   12-FEB-21  EXPLICIT
30735865   15-FEB-21  EXPLICIT

30399994 Patch R12.ATG_PF.C.delta.9 (Application Technology Family)
30399999 R12.2.10
30628681 Patch R12.AD.C.delta.12  (Application DBA)
30735865 Patch R12.TXK.C.delta.12  (Application Technology Stack)

16). Start R12.2 services

$ sh $ADMIN_SCRIPTS_HOME/adstrtal.sh apps/apps_PWD

It stayed long and may post errors in some instances from running "adadminsrvctl.sh start -nopromptmsg":

Executing service control script: $INST_TOP/admin/scripts/adadminsrvctl.sh start -nopromptmsg
Timeout specified in context file: -1 second(s)
script returned:
************************
You are running adadminsrvctl.sh version 120.10.12020000.11
Starting WLS Admin Server...
Refer $INST_TOP/logs/appl/admin/log/adadminsrvctl.txt for details
AdminServer logs are located at $FMW_HOME/user_projects/domains/EBS_domain_${TWO_TASK}/servers/AdminServer/logs
adadminsrvctl.sh: exiting with status 0
adadminsrvctl.sh: check the logfile $INST_TOP/logs/appl/admin/log/adadminsrvctl.txt for more information ...

.end std out.
java.rmi.NoSuchObjectException: The object identified by: '299' could not be found.  Either it was has not been exported or it has been collected by the distributed garbage collector.
        at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
        at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
        at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.getMBeanCount(Unknown Source)
        at weblogic.management.remote.common.RMIConnectionWrapper$11.run(ClientProviderBase.java:782)
       … … … 
.end err out.

During services startup, CPU usage is high on the server. Seems adadminsrvctl.sh did some configuration in the first execution. In its 2nd run, the Java errors did not show up again. And the errors do not show always up in my other instances. The Java errors match with Doc ID 2335354.1. But there are many folders called nodemanager. I do not know yet which file causes the problem.
$ find . -type d -name nodemanager 

After adstrtal.sh finished, I was able to log onto EBS R12.2 site. The first page is Secure Configuration Console. Click on Unlock and choose Ignore .., then click on Proceed. 
At this stage, after site http URL is added to Java Security tab, EBS Forms and concurrent jobs work only in IE browser. MS Edge does not open the Forms because default R12.2 JRE version 1.6 is lower than the JRE version on my PC.

There are two methods to access the Secure Configuration Console home page later (See https://docs.oracle.com/cd/E26401_01/doc.122/e22952/T156458T663583.htm).
. Using the Functional Administrator responsibility:
On the Oracle E-Business Suite home page, select the Functional Administrator responsibility in the Navigator pane. Then, on the Functional Administrator page, select the Configuration Manager tab.
. Using the OAM Security Dashboard:
On the Oracle E-Business Suite home page, select System Administrator in the Navigator pane. Then select Oracle Applications Manager, then OAM Security Dashboard. On the dashboard, under the Configuration Management section is a link to the Secure Configuration Console.

WLS Admin console at http://nodename.domian.com:s_wls_adminport/console is not accessible by error:
The Server is not able to service this request: [Socket:000445]Connection rejected, filter blocked Socket, weblogic.security.net.FilterException: [Security:090220] rule 2

The error is also in AdminServer.log under $FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/AdminServer/logs. The fix is replace one line in file config.xml under $FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/config

    <connection-filter-rule>0.0.0.0/0 * * deny</connection-filter-rule>
    <connection-filter-rule>0.0.0.0/0 * * allow</connection-filter-rule>  (<= good one)

After shutdown Admin Server services and re-start them, Admin Server console worked.

$ ps -ef | grep $LOGNAME | wc -l
81

17). Post actions when Apps services are running (See Doc ID 2666934.1 section 8.1)
Notes: ADOP cleanup and fs_clone steps here can be deferred and run after Post steps in which more patches are applied. 

$ adop -status
Enter the APPS password:
Connected.
==============================================================
ADOP (C.Delta.12)
Session Id: 2
Command: status
Output: $NE_BASE/EBSapps/log/adop/2/20210217_114609/adzdshowstatus.out
====================================================================
Node Name  Node Type  Phase           Status            Started                       Finished                      Elapsed
--------------- ---------- --------------- --------------- -------------------- -------------------- ------------
node_name  master        APPLY             ACTIVE    2021/02/12 11:53:31  2021/02/16 21:15:16  105:21:45
                                       FINALIZE       NOT STARTED
                                       CLEANUP       NOT STARTED

$ adop phase=cleanup           (See Doc ID 2666934.1 section 8.1)
                                        <== it takes 5 minutes
The cleanup phase completed successfully.
adop exiting with status = 0 (Success)

Run FS_CLONE. This action will copy the new run edition code and configuration to the other file system, to ensure that both file systems are in sync before applying patches using the regular adop cycle on the other file system.

$ echo $FILE_EDITION
run
$ adop phase=fs_clone
                                            <= it takes 40 minutes or so
Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:
Validating credentials.
Initializing.
    Run Edition context  : $CONTEXT_FILE
    Patch edition context: %CONTEXT_FILE on /fs2/
    Patch file system free space: 62.92 GB
Validating system setup.
    Node registry is valid.
Checking for existing adop sessions.
    No pending session exists.
    Starting new adop session.
===================================================
ADOP (C.Delta.12)
Session ID: 3
Node: $EBS_HOSTNAME
Phase: fs_clone
Log: $NE_BASE/EBSapps/log/adop/3/20210218_182108/adop.log
==================================================
Validating configuration on node: [$EBS_HOSTNAME].
    Log: $NE_BASE/EBSapps/log/adop/3/20210218_182108/fs_clone/validate/$EBS_HOSTNAME
        [WARNING]: There could be issues while validating the ports used for E-Business Suite instance against ports used in /etc/services. Refer the log file for more details.
Checking for pending cleanup actions.
    No pending cleanup actions found.
Blocking managed server ports.
    Log: $NE_BASE/EBSapps/log/adop/3/20210218_182108/fs_clone/$EBS_HOSTNAME/txkCloneAcquirePort.log
Performing CLONE steps.
    Log: $NE_BASE/EBSapps/log/adop/3/20210218_182108/fs_clone/$EBS_HOSTNAME

Beginning application tier FSCloneStage - Thu Feb 18 18:23:54 2021
$COMMON_TOP/util/jdk32/bin/java -Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath $FMW_HOME/webtier/lib/xmlparserv2.jar: …  oracle.apps.ad.clone.FSCloneStageAppsTier -e $CONTEXT_FILE -targ -stage $COMMON_TOP/adopclone_$EBS_HOSTNAME -tmp /tmp -component appsTier -nopromptmsg
Log file located at $INST_TOP/admin/log/clone/FSCloneStageAppsTier_02181823.log
Completed FSCloneStage...
Thu Feb 18 18:30:49 2021
Beginning application tier FSCloneApply - Thu Feb 18 18:33:21 2021
$COMMON_TOP/adopclone_$EBS_HOSTNAME/FMW/t2pjdk/bin/java -Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath $FMW_HOME/adopclone_$EBS_HOSTNAME/jlib/xmlparserv2.jar: …  oracle.apps.ad.clone.FSCloneApplyAppsTier -e $CONTEXT_FILE ……
Log file located at $INST_TOP/admin/log/clone/FSCloneApplyAppsTier_02181833.log
Log file located at $INST_TOP/admin/log/clone/FSCloneApplyAppsTier_02181833.log
Target System Fusion Middleware Home set to $PATCH_BASE/FMW_Home
Target System Web Oracle Home set to $PATCH_BASE/FMW_Home/webtier
Target System Appl TOP set to $PATCH_BASE/EBSapps/appl
Target System COMMON TOP set to $PATCH_BASE/EBSapps/comn
Target System Instance Top set to $PATCH_BASE/inst/apps/$CONTEXT_NAME
Report file located at $PATCH_BASE/inst/apps/$CONTEXT_NAME/temp/portpool.lst

The new APPL_TOP context file has been created : $CONTEXT_FILE on /fs2/
contextfile=$CONTEXT_FILE on /fs2/
Completed FSCloneApply...
Thu Feb 18 18:58:25 2021
Resetting FARM name...
runDomainName: EBS_domain_$TWO_TASK
patchDomainName:
targets_xml_loc: $FMW_HOME/user_projects/domains//sysman/state/targets.xml
$FMW_HOME/user_projects/domains//sysman/state/targets.xml file not found or it does not have read/write permissions.
Releasing managed server ports.
    Log: $NE_BASE/EBSapps/log/adop/3/20210218_182108/fs_clone/$EBS_HOSTNAME/txkCloneAcquirePort.log
Synchronizing snapshots.
Stopping services on patch file system.
    Stopping admin server.
You are running adadminsrvctl.sh version 120.10.12020000.11
Stopping WLS Admin Server...
Refer $PATCH_BASE/inst/apps/$CONTEXT_NAME/logs/appl/admin/log/adadminsrvctl.txt for details
AdminServer logs are located at $FMW_HOME/user_projects/domains/EBS_domain/servers/AdminServer/logs
adadminsrvctl.sh: exiting with status 0
adadminsrvctl.sh: check the logfile $PATCH_BASE/inst/apps/$CONTEXT_NAME/logs/appl/admin/log/adadminsrvctl.txt for more information ... 
    Stopping node manager.
You are running adnodemgrctl.sh version 120.11.12020000.12
The Node Manager is already shutdown
NodeManager log is located at $PATCH_BASE/FMW_Home/wlserver_10.3/common/nodemanager/nmHome1
adnodemgrctl.sh: exiting with status 2
adnodemgrctl.sh: check the logfile $PATCH_BASE/inst/apps/$CONTEXT_NAME/logs/appl/admin/log/adnodemgrctl.txt for more information ... 
Generating log report.
    Output: $NE_BASE/EBSapps/log/adop/3/20210218_182108/fs_clone/$EBS_HOSTNAME/adzdshowlog.out
The fs_clone phase completed successfully.
adop exiting with status = 0 (Success)

$ adop -status
Enter the APPS password:
Connected.
=================================
ADOP (C.Delta.12)
Session Id: 3
Command: status
Output: $NE_BASE/EBSapps/log/adop/3/20210219_134510/adzdshowstatus.out
=========================================
Node Name                 Node Type  Phase                        Status      Started                       Finished                    Elapsed
--------------- ---------- --------------- --------------- -------------------- -------------------- ------------
$EBS_HOSTNAME    master     FS_CLONE   COMPLETED   2021/02/18 18:21:59  2021/02/18 18:58:36  0:36:37

18) Post-upgrade steps & Additional critical patches (Doc Sections 9 & 10)

Apply patches 30399996 (12.2.10 Online Help. And, may need more product specific patches)

$ echo $APPL_TOP
/u02/app/$TWO_TASK/fs1/EBSapps/appl
$ echo $FILE_EDITION
run
$ cd $PATCH_TOP
$ unzip p30399996_R12_GENERIC.zip
$ adop phase=apply patches=30399996 hotpatch=yes
… …                                                          <= it takes 2 hours or more
Patch file system free space: 48.54 GB
Validating system setup.
    Node registry is valid.
Checking for existing adop sessions.
        [INFO] ICM is not down
        [INFO] Connection to http://node_name.domain.com:8041 successful
    [WARNING]   You should only specify hotpatch mode when directed to by the patch readme.
    No pending session exists.
    Starting new adop session.
===========================================================
ADOP (C.Delta.12)
Session ID: 4
Node: $EBS_HOSTNAME
Phase: apply
Log: $NE_BASE/EBSapps/log/adop/4/20210219_141932/adop.log
===========================================================
Applying patch 30399996.
    Log: $NE_BASE/EBSapps/log/adop/4/20210219_141932/apply/$EBS_HOSTNAME/30399996/log/u30399996.log
Running finalize actions for the patches being applied.
    Log: @ADZDSHOWLOG.sql "2021/02/19 15:47:20"
Running cutover actions for the patches being applied.
    Creating workers to process cutover DDL in parallel
    Log: $NE_BASE/EBSapps/log/adop/4/20210219_141932/apply/$EBS_HOSTNAME/log/cutover.log
    Performing database cutover in Quick mode
Generating post apply reports.
Generating log report.
    Output: $NE_BASE/EBSapps/log/adop/4/20210219_141932/apply/$EBS_HOSTNAME/adzdshowlog.out
The apply phase completed successfully.
adop exiting with status = 0 (Success)

Apply Patch 31948857  (additional critical patch.  Section 10)      

$ cd $PATCH_TOP
$ unzip p31948857_R12.FND.C_R12_GENERIC.zip
$ echo $FILE_EDITION
run
$ adop phase=apply patches=31948857 hotpatch=yes
                                                                      <= it takes less than 10 minutes
$ adop -status
Enter the APPS password:
Connected.
==================================================
ADOP (C.Delta.12)
Session Id: 4
Command: status
Output: $NE_BASE/EBSapps/log/adop/4/20210222_105721/adzdshowstatus.out
==================================================
Node Name                     Node Type  Phase           Status         Started              Finished             Elapsed
-------------------------- ----------------- ----------------- -------------------- -------------------- ------------
$EBS_HOSTNAME      master    APPLY            ACTIVE        2021/02/19 14:20:27  2021/02/19 16:41:32  2:21:05
                                                      CLEANUP      NOT STARTED

Update the snapshot manually with the steps below. It is safe to run it (see Doc ID 1320300.1 Section 1.9):
1) Start adadmin after source the RUN FS env.
2) Select "2. Maintain Applications Files menu" in "AD Administration Main Menu".
3) In "Maintain Applications Files", select "4. Maintain snapshot information".
4) Select "2. Update current view snapshot" in the "Maintain Snapshot Information".
5) Select "1. Update Complete APPL_TOP" in the "Maintain Current View Snapshot Information".

$ adadmin       <== it takes 20 to 30 minutes
… … 
Note: Your APPL_TOP has 16 files missing. Some of these files are referenced in your file drivers but are missing in the APPL_TOP.
Cleaning up temporary files...
      ***** File-system snapshot utility completed successfully ******
 Recording Adadmin action :ADADMIN_UPDATE_CURRENT_VIEW
 Tokens:UPDATE_CURR_VW=1
Review the messages above, then press [Return] to continue.

Confirm all 6 patches were applied:
SQL> SELECT adb.bug_number, adb.creation_date, ad_patch.is_patch_applied('R12',-1, adb.bug_number) status
FROM ad_bugs adb
WHERE adb.bug_number in 
('30628681', '30735865', '30399994', '30399999', '30399996', '31948857');

Confirm EBS R12.2 services are still up and running. I can log onto the site to submit concurrent job by IE (Internet Explorer version 1909).
$ ps -ef | grep $LOGNAME | wc -l
81

It is good time to check the diskspace usage and do a full backup.
$ cd $TWO_TASK
$ du -h --max-depth=1
33G     ./apps
3.0G    ./inst
43G     ./fs1
36G     ./fs2
22G     ./fs_ne
138G    .

From R12.2 upgrade installation, JRE version is 1.6 and JWS is not enabled by default:

$  cat $FORMS_WEB_CONFIG_FILE|grep sun_plugin_version| cut -c 1-35
sun_plugin_version=1.6.0_27
$ grep s_forms_launch_method $CONTEXT_FILE
         <config_option type="techstack" oa_var="s_forms_launch_method">browser</config_option>

R12.2 comes with JDK 1.7.0_85.  If JDK upgrade is necessary, follow Doc ID 1530033.1
- Using the Latest JDK 7.0 Update with Oracle E-Business Suite Release 12.2.

$  $ADJVAPRG -version
java version "1.7.0_85"
Java(TM) SE Runtime Environment (build 1.7.0_85-b15)
Java HotSpot(TM) Client VM (build 24.85-b06, mixed mode)

$ $AFJVAPRG -version
java version "1.7.0_85"
Java(TM) SE Runtime Environment (build 1.7.0_85-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.85-b06, mixed mode)

By now, EBS is successfully upgraded to R12.2.10.

1 comment:

Santosh said...
This comment has been removed by a blog administrator.