How to configure patch file system in R12.2

To re-create or configure  the patch file system in ebs. 


Follow the below step's to configure the patch file system in R12.2.

1. Run adpreclone.pl on run file system

Source run file system.

$ perl adpreclone.pl appsTier


2. Detach PATCH homes:

Below Oracle Homes are already registered in the inventory:

/oracle/EBSFS/fs2/FMW_Home/Oracle_EBS-app1

/oracle/EBSFS/fs2/FMW_Home/webtier

/oracle/EBSFS/fs2/FMW_Home/oracle_common


 cd $FMW_HOME/oracle_common/oui/bin

./runInstaller -removeHome ORACLE_HOME=/oracle/EBSFS/fs2/FMW_Home/Oracle_EBS-app1 -silent


Starting Oracle Universal Installer...


Checking swap sptest: must be greater than 500 MB.   Actual 4604 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /etc/oraInventory

'RemoveHome' was successful.


./runInstaller -removeHome ORACLE_HOME=/oracle/EBSFS/fs2/FMW_Home/webtier -silent


Starting Oracle Universal Installer...


Checking swap sptest: must be greater than 500 MB.   Actual 4604 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /etc/oraInventory


'RemoveHome' was successful.


./runInstaller -removeHome ORACLE_HOME=/oracle/EBSFS/fs2/FMW_Home/oracle_common -silent


Starting Oracle Universal Installer...


Checking swap sptest: must be greater than 500 MB.   Actual 4604 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /etc/oraInventory


'RemoveHome' was successful.


cd $COMMON_TOP/clone/bin/


3. Run adcfgclone.pl on run file system.


[applmgr@testsrv bin]$  perl adcfgclone.pl appsTier

                     Copyright (c) 2002, 2015 Oracle Corporation

                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adcfgclone Version 120.63.12020000.65

                ***********************************************************

                In AD-TXK Delta 7, we recommend you clone the run and patch

                file systems in a single operation using the 'dualfs' option.

                Separate cloning of the run and patch file systems will be deprecated

                ************************************************************

Enter the APPS password :

Enter the Weblogic AdminServer password :

Do you want to add a node (yes/no) [no] : no

Running: Context clone...

Log file located at /oracle/EBSFS/fs1/EBSapps/comn/clone/bin/CloneContext_0618160140.log

Target System File Edition type [run] : patch

Enter the full path of Run File System Context file : /oracle/EBSFS/fs1/inst/apps/test_testsrv/appl/admin/test_testsrv.xml

Provide the values required for creation of the new APPL_TOP Context file.

Target System Fusion Middleware Home set to /oracle/EBSFS/fs2/FMW_Home

Target System Web Oracle Home set to /oracle/EBSFS/fs2/FMW_Home/webtier

Target System Appl TOP set to /oracle/EBSFS/fs2/EBSapps/appl

Target System COMMON TOP set to /oracle/EBSFS/fs2/EBSapps/comn

RC-00217: Warning: Configuration home directory (s_config_home) evaluates to /oracle/EBSFS/fs2/inst/apps/test_testsrv.

A directory with this name already exists and is not empty.

Do you want to continue (y/n)   : y

Target System Instance Top set to /oracle/EBSFS/fs2/inst/apps/test_testsrv

Target System Port Pool [0-99] : 2

Checking the port pool 2

done: Port Pool 2 is free

Report file located at /oracle/EBSFS/fs2/inst/apps/test_testsrv/temp/portpool.lst

The new APPL_TOP context file has been created :

  /oracle/EBSFS/fs2/inst/apps/test_testsrv/appl/admin/test_testsrv.xml

Check Clone Context logfile /oracle/EBSFS/fs1/EBSapps/comn/clone/bin/CloneContext_0618160140.log for details.


Running Rapid Clone with command:


Running:

perl /oracle/EBSFS/fs1/EBSapps/comn/clone/bin/adclone.pl java=/oracle/EBSFS/fs1/EBSapps/comn/clone/bin/../jre mod            e=apply stage=/oracle/EBSFS/fs1/EBSapps/comn/clone component=appsTier method=CUSTOM appctxtg=/oracle/EBSFS/fs2/in            st/apps/test_testsrv/appl/admin/test_testsrv.xml showProgress contextValidated=true


FMW Pre-requisite check log file location : /oracle/EBSFS/fs1/EBSapps/comn/clone/FMW/logs/prereqcheck.log


Running: /oracle/EBSFS/fs1/EBSapps/comn/clone/FMW/t2pjdk/bin/java -classpath /oracle/EBSFS/fs1/EBSapps/comn/clone            /prereq/webtier/Scripts/ext/jlib/engine.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrere            q.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereqChecks.jar:/oracle/EBSFS/fs1/EBSapps/            comn/clone/prereq/webtier/oui/jlib/OraInstaller.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/            OraInstallerNet.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/srvm.jar:/oracle/EBSFS/fs1/EBSap            ps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/Script            s/ext/jlib/ojdl2.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl-log4j.jar:/oracle/            EBSFS/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/xmlparserv2.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/prereq/            webtier/oui/jlib/share.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/java oracle.apps.ad.clone.util.FMWOracleHome            PreReqCheck -prereqCheckFMW -e /oracle/EBSFS/fs2/inst/apps/test_testsrv/appl/admin/test_testsrv.xml -stage             /oracle/EBSFS/fs1/EBSapps/comn/clone -log /oracle/EBSFS/fs1/EBSapps/comn/clone/FMW/logs/prereqcheck.log


Beginning application tier Apply - Fri Jun 18 16:02:25 2021


/oracle/EBSFS/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -DC            ONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/xmlpar            serv2.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/ojdbc6.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/java:/or            acle/EBSFS/fs1/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/oui/ewt3.ja            r:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/oui/share.jar:/oracle/EBSFS/fs2/FMW_Home/webtier/../Oracle_EBS-app1/o            ui/jlib/srvm.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/oracle/EBSFS/fs2/FMW_Home/wlserver_10.3/se            rver/lib/weblogic.jar:/oracle/EBSFS/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.Apply            AppsTier -e /oracle/EBSFS/fs2/inst/apps/test_testsrv/appl/admin/test_testsrv.xml -stage /oracle/EBSFS/fs1/E            BSapps/comn/clone    -showProgress -nopromptmsg

Log file located at /oracle/EBSFS/fs2/inst/apps/test_testsrv/admin/log/clone/ApplyAppsTier_06181602.log

  -      0% completed


Once complete the patch file system configuration.


4. Verify as below.

In the new terminal - source PATCH file-system

$ EBSapps.env patch

$ echo $FILE_EDITION


In new terminal - source RUN file-system

# Run Admin server MUST be up for this step

$ EBSapps.env run

$ adop phase=fs_clone force=yes


txkGenADOPWrapper.pl line 143 ) ERRORCODE = 1 ERRORCODE_END

 WARNING: [AutoConfig Error Report]

The following report lists errors AutoConfig encountered during each

phase of its execution.  Errors are grouped by directory and phase.

The report format is:

      <filename>  <phase>  <return code where appropriate>


  [INSTANTIATE PHASE]

  AutoConfig could not successfully instantiate the following files:

    Directory: /oracle/EBSFS

      EBSapps.env             INSTE8


  [APPLY PHASE]

  AutoConfig could not successfully execute the following scripts:

    Directory: /oracle/EBSFS/fs1/FMW_Home/webtier/perl/bin/perl -I /oracle/EBSFS/fs1/FMW_Home/webtier/perl/lib/5.10.0 -I /oracle/EBSFS/fs1/FMW_Home/webtier/perl/lib/site_perl/5.10.0 -I /oracle/EBSFS/fs1/EBSapps/appl/au/12.0.0/perl -I /oracle/EBSFS/fs1/FMW_Home/webtier/ohs/mod_perl/lib/site_perl/5.10.0/x86_64-linux-thread-multi /oracle/EBSFS/fs1/inst/apps/ACE_samarthapps/admin/install

      txkGenADOPWrapper.pl    INSTE8_APPLY       1

AutoConfig is exiting with status 2




The following error can also be found in RCloneApplyAppstier_xxxx.log file:

STACK TRACE
at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/Error.pm line 168
TXK::Error::abort('TXK::Error', 'HASH(0x1e1aaa8)') called at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/Common.pm line 299
TXK::Common::doError('TXK::SQLPLUS=HASH(0x2581090)', 'SQLPLUS error: buffer=\x{a}\x{a}SQL*Plus: Release 10.1.0.5.0 - Produc...', undef) called at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/Common.pm line 314
TXK::Common::setError('TXK::SQLPLUS=HASH(0x2581090)', 'SQLPLUS error: buffer=\x{a}\x{a}SQL*Plus: Release 10.1.0.5.0 - Produc...') called at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/SQLPLUS.pm line 832
TXK::SQLPLUS::_doExecute('TXK::SQLPLUS=HASH(0x2581090)', 0) called at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/SQLPLUS.pm line 234
TXK::SQLPLUS::execute('TXK::SQLPLUS=HASH(0x2581090)', 'HASH(0x2e0b910)') called at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/TechstackDB.pm line 618
TXK::TechstackDB::_getSQLValue('TXK::TechstackDB=HASH(0x2571088)', 'SELECT ad_zd_adop.get_node_type(\'ebs\') FROM DUAL') called at ...fs2/EBSapps/appl/au/12.0.0/perl/TXK/TechstackDB.pm line 573
TXK::TechstackDB::getSQLValue('TXK::TechstackDB=HASH(0x2571088)', 'SELECT ad_zd_adop.get_node_type(\'ebs\') FROM DUAL') called at ...fs2/inst/apps/EBSDEV_ebs/admin/install/txkGenADOPWrapper.pl line 503
main::getNodeType() called at ...fs2/inst/apps/EBSDEV_ebs/admin/install/txkGenADOPWrapper.pl line 199
eval {...} called at ...fs2/inst/apps/EBSDEV_ebs/admin/install/txkGenADOPWrapper.pl line 140
)
ERRORCODE = 1 ERRORCODE_END
.end std out.
CHANGES
This error has been found to occur for the following two scenarios:

When the node is migrated the application tier to single target node by following the note Application Tier Platform Migration with Oracle E-Business Suite Release 12.2 (Doc ID 2048954.1)
When cloning from multinode environment
CAUSE
The value of one of the following two variables in the fnd_oam_context_files table is set to 'disabled'. The function ad_zd_adop.get_node_type() expects the values of BOTH of them to show with the value of 'enabled'.

- s_web_admin_status
- s_adminserverstatus

The reason of the table fnd_oam_context_files to have these incorrect values is that the same incorrect values exist in the application context file from where the values in the database are updated.

Please be aware that only one of the two variables could have the value 'disabled' and the issue would still occur.

SOLUTION:-

To solve this issue modify the application context file with the proper values for s_web_admin_status and s_nodemanagerstatus and then run autoconfig to recreate the fnd_oam_context_files with the new values from the context file. Please do the following:

1. Modify these two variables to 'enabled' in the RUN file system context file on the target server.

<oa_service_status oa_var="s_adminserverstatus">disabled</oa_service_status>
<oa_service_group_status oa_var="s_web_admin_status">disabled</oa_service_group_status>

to 

<oa_service_status oa_var="s_adminserverstatus">enabled</oa_service_status>
<oa_service_group_status oa_var="s_web_admin_status">enabled</oa_service_group_status>

2. Run autoconfig again.

$ sh $AD_TOP/bin/adconfig.sh contextfile=<RUN_CONTEXT_FILE>

3. Run the following function passing the proper node name (e.g. ebs) and this time it should not fail.

SQL> SELECT ad_zd_adop.get_node_type('ebs') FROM DUAL;

Note: the value 'ebs' is just an example. You will need to replace it with the value of your target node.

4. Run the script that was failing and now it should be able to pass this error.

adop phase=prepare error |ssh is not enabled for the following nodes|[UNEXPECTED]ssh is not enabled.

In EBS R12.2, ssh should be enabled on primary and secondory node for multinode architecture. Here we will do the some action to enable ssh.


[applmgr@uatapps ~]$ adop phase=prepare


Enter the APPS password:

Enter the SYSTEM password:

Enter the WLSADMIN password:


Validating credentials.


Initializing.

    Run Edition context  : /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/appl/admin/UAT_uatapps.xml

    Patch edition context: /oracle/EBSFS/fs2/inst/apps/UAT_uatapps/appl/admin/UAT_uatapps.xml

    Patch file system free spUAT: 473.98 GB


Validating system setup.

    Node registry is valid.

    Log: /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/logs/appl/rgf/TXK/verifyssh.log

    Output: /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/logs/appl/rgf/TXK/out.xml

    ssh is not enabled for the following nodes

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

    UATapps

    [UNEXPECTED]ssh is not enabled.

    [UNEXPECTED]Available options are as follows.

    [UNEXPECTED]- To enable ssh, run the following command:

     perl /oracle/EBSFS/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/txkRunSSHSetup.pl enablessh \

          -contextfile=/oracle/EBSFS/fs1/inst/apps/UAT_uatapps/appl/admin/UAT_uatapps.xml \

          -hosts=UATapps,uatapps

  Then try the adop command again.

    [UNEXPECTED]- Otherwise, with ssh disabled you must run adop on each node:

     On the admin node, run: adop phase=<desired phase> allnodes=no action=db

     On the other nodes, run: adop phase=<desired phase> allndoes=no action=nodb

    [UNEXPECTED]Error verifying ssh setup.



[STATEMENT] Please run adopscanlog utility, using the command


"adopscanlog -latest=yes"


to get the list of the log files along with snippet of the error message corresponding to each log file.



adop exiting with status = 2 (Fail)


[applmgr@uatapps ~]$ perl /oracle/EBSFS/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/txkRunSSHSetup.pl  enablessh \

> -contextfile=/oracle/EBSFS/fs1/inst/apps/UAT_uatapps/appl/admin/UAT_uatapps.xml \

> -hosts=UATapps,uatapps

Enter SSH User password for the OS user applmgr:

    Log: /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/logs/appl/rgf/TXK/enablessh.log


Error in setting up ssh equivalence


FAILED: enableSSH

[applmgr@uatapps ~]$ perl /oracle/EBSFS/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/txkRunSSHSetup.pl  enablessh -contextfile=/oracle/EBSFS/fs1/inst/apps/UAT_uatapps/appl/admin/UAT_uatapps.xml -hosts=UATapps,uatapps

Enter SSH User password for the OS user applmgr:

    Log: /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/logs/appl/rgf/TXK/enablessh.log

SSH equivalence setup successful.


[applmgr@uatapps ~]$ cat /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/logs/appl/rgf/TXK/enablessh.log

Obfuscated password present

This script will setup SSH Equivalence from the host 'uatapps.UAT-cranes.com' to specified remote hosts.


ORACLE_HOME = /oracle/EBSFS/fs1/FMW_Home/Oracle_EBS-app1

JAR_LOC = /oracle/EBSFS/fs1/FMW_Home/Oracle_EBS-app1/oui/jlib

SSH_LOC = /oracle/EBSFS/fs1/FMW_Home/Oracle_EBS-app1/oui/jlib

OUI_LOC = /oracle/EBSFS/fs1/FMW_Home/Oracle_EBS-app1/oui

JAVA_HOME = /oracle/EBSFS/fs1/FMW_Home/Oracle_EBS-app1/jdk


Checking if the remote hosts are reachable.

ClusterLogger - log file location: /home/applmgr/Logs/remoteInterfUATs2021-06-17_12-26-08-PM.log

Failed Nodes : UATapps uatapps

Remote host reachability check succeeded.

All hosts are reachable. Proceeding further...


NOTE :

As part of the setup procedure, this script will use ssh and scp to copy

files between the local host and the remote hosts. You may be prompted for

the password during the execution of the script.

AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY

AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE

directories.


ClusterLogger - log file location: /home/applmgr/Logs/remoteInterfUATs2021-06-17_12-26-09-PM.log

Logfile Location : /oracle/EBSFS/fs1/inst/apps/UAT_uatapps/logs/appl/rgf/TXK/enablessh2021-06-17_12-26-09-PM.log

Checking binaries on remote hosts...

Doing SSHSetup...

Please be patient, this operation might take sometime...Dont press Ctrl+C...

Validating remote binaries..

Remote binaries check succeeded


Local Platform:- LINUX


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

Verifying SSH setup

===================

The script will now run the date command on the remote nodes using ssh

to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,

THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR

PASSWORDS. If you see any output other than date or are prompted for the

password, ssh is not setup correctly and you will need to resolve the

issue and set up ssh again.


The possible causes for failure could be:

1. The server settings in /etc/ssh/sshd_config file do not allow ssh

for user applmgr.

2. The server may have disabled public key based authentication.

3. The client public key on the server may be outdated.

4. ~applmgr or ~applmgr/.ssh on the remote host may not be owned by applmgr.

5. User may not have passed -shared option for shared remote users or

may be passing the -shared option for non-shared remote users.

6. If there is output in addition to the date, but no password is asked,

it may be a security alert shown as part of company policy. Append the

additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.

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

--UATapps:--

Running /usr/bin/ssh -x -l applmgr UATapps date to verify SSH connectivity has been setup from local host to UATapps.

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.

Thu Jun 17 12:26:44 IST 2021

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

--uatapps:--

Running /usr/bin/ssh -x -l applmgr uatapps date to verify SSH connectivity has been setup from local host to uatapps.

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.

Thu Jun 17 12:26:44 IST 2021

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

SSH verification complete.