Thursday, October 18, 2012

Cloning Oracle 11g Grid Home 

Cloning oracle RAC binaries has become common practice but same is not always true with the Grid!! We recently patched one of our RAC env and need to apply the same patches to the QA. 
One way was to repeat the process on env to be patched. Second was to clone env and use it for RAC DBs.
Since the Cloning Grid was not very common and was looking challenging, i decided to give it a try. 

On the source node, create a copy of the Oracle grid infrastructure home. To keep the installed Oracle grid infrastructure home as a working home, make a full copy of the source Oracle grid infrastructure home and remove the unnecessary files from the copy. For example, as root on Linux systems, run the cp command:

[oracle@appsractest bin]$  cp -prf Grid_home location_of_the_copy_of_Grid_home
Delete unnecessary files from the copy.

The Oracle grid infrastructure home contains files that are relevant only to the source node, so you can remove the unnecessary files from the copy in the log, crs/init, and cdata directories. Check following to remove the unnecessary files from the copy of the Oracle grid infrastructure home:


[oracle@appsractest bin]$ cd /u01/app/11.2.0.2/grid

[oracle@appsractest grid]$  rm -rf  /u01/app/11.2.0.2/grid/log/host_name
[oracle@appsractest grid]$  rm -rf crs/init
[oracle@appsractest grid]$  rm -rf cdata
[oracle@appsractest grid]$  rm -rf gpnp/*
[oracle@appsractest grid]$  rm -rf network/admin/*.ora
[oracle@appsractest grid]$  find . -name '*.ouibak' -exec rm {} \;
[oracle@appsractest grid]$  find . -name '*.ouibak.1' -exec rm {} \;
[oracle@appsractest grid]$  rm -rf root.sh*
[oracle@appsractest grid]$  rm -rf  /u01/app/11.2.0.2/grid/inventory/ContentsXML/oraclehomeproperties.xml
[oracle@appsractest grid]$  cd cfgtoollogs
[root@node1 cfgtoollogs]# find . -type f -exec rm -f {} \;


Create a compressed copy of the previously copied Oracle grid infrastructure home using tar or gzip on Linux and UNIX systems. Ensure that the tool you use preserves the permissions and file time-stamps. 

The steps to create a cluster through cloning are as follows:
Prepare the new cluster nodes
Deploy Oracle Clusterware on the destination nodes
Run the clone.pl script on each destination node
Prepare crsconfig_params file on all nodes
Run the orainstRoot.sh script on each node
Run the Grid_home/root.sh script
Run the configuration assistants and CVU
Step 1: Prepare the New Cluster Nodes

On each destination node, perform the following preinstallation steps:
Specify the kernel parameters
Configure block devices for Oracle Clusterware devices
Ensure that you have set the block device permissions correctly
Use short, nondomain-qualified names for all of the names in the Hosts file
Test whether the interconnect interfaces are reachable using the ping command
Verify that the VIP addresses are not active at the start of the cloning process by using the ping command (the ping command of the VIP address must fail)
Delete all files in the Grid_home/gpnp folder

Note:
If the Grid_home/gpnp folder contains any files, then cluster creation fails. All resources are added to the existing cluster, instead.
Run CVU to verify your hardware and operating system environment

-- Create the grid home directory on destination home
[root@appsractest ]## mkdir -p /u01/app/11.2.0/grid
[root@appsractest ]# cd /u01/app/11.2.0/grid
[root@appsractest ]# tar -zxvf /home/oracle/gridHome.tgz
In this example, path_name represents the directory structure in which you want to install the Oracle grid infrastructure home. Note that you can change the Grid Home location as part of the clone process
Change the ownership of all of the files to belong to the oracle:oinstall group, and create a directory for the Oracle Inventory. The following example shows the commands to do this on a Linux system:

[root@appsractest grid]# chown -R oracle:oinstall /u01/app/11.2.0/grid
[root@appsractest grid]# mkdir -p /u01/app/oraInventory
[root@appsractest grid]# chown oracle:oinstall /u01/app/oracle/oraInventory

It is important to remove any Oracle network files from the /u01/app/11.2.0.2/grid/network/admin directory on both nodes before continuing. For example, remove any tnsnames.ora, listener.ora or sqlnet.ora files.

[oracle@appsractest bin]$ /home/oracle/clone.sh 
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01/app/oracle" "ORACLE_HOME=/u01/app/11.2.0.2/grid" "ORACLE_HOME_NAME=OraHome1Grid" "INVENTORY_LOCATION=/u01/app/oraInventory" "CLUSTER_NODES={appsractest}" "LOCAL_NODE=appsractest" -silent -noConfig -nowait 

Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.   Actual 2047 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-10-16_05-26-26AM. Please wait ...Oracle Universal Installer, Version 11.2.0.2.0 Production
Copyright (C) 1999, 2010, Oracle. All rights reserved.

You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2012-10-16_05-26-26AM.log
...
Performing tests to see whether nodes  are available
............................................................... 100% Done.
Installation in progress (Tuesday, October 16, 2012 5:27:02 AM IST)
.........................................................................                                                       73% Done.
Install successful
Linking in progress (Tuesday, October 16, 2012 5:27:20 AM IST)
Link successful
Setup in progress (Tuesday, October 16, 2012 5:29:49 AM IST)
................                                                100% Done.
Setup successful

End of install phases.(Tuesday, October 16, 2012 5:30:10 AM IST)
WARNING:
The following configuration scripts need to be executed as the "root" user in each cluster node.
/u01/app/11.2.0.2/grid/rootupgrade.sh #On nodes appsractest
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts in each cluster node

The cloning of OraHome1Grid was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2012-10-16_05-26-26AM.log' for more details.
-- Repeat the above steps for all the nodes in cluster

Run the script on the local node first. After successful completion, you can run the script in parallel on all the other nodes, except a node you designate as the last node. When all the nodes except the last node are done successfully, run the script on the last node.

Execution of rootupgrade.sh log file - 
Running Oracle 11g root script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/11.2.0.2/grid

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/11.2.0.2/grid/crs/config/config.sh

This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.

-- Run orainstRoot.sh script as follows
[root@appsractest ~]# cd /u01/app/oraInventory/
[root@appsractest oraInventory]# ./orainstRoot.sh 
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@appsractest oraInventory]# 
[root@appsractest oraInventory]# echo Then run the following command:
Then run the following command:
-- For our process we need to prepare the following crsconfig file and then execute rootcrs.pl script as follows

-- prepare crsconfig_params file /u01/app/11.2.0.2/grid/crs/install/crsconfig_params

[root@appsractest grid]# /u01/app/11.2.0.2/grid/perl/bin/perl -I/u01/app/11.2.0.2/grid/perl/lib -I/u01/app/11.2.0.2/grid/crs/install /u01/app/11.2.0.2/grid/crs/install/rootcrs.pl 
Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
-- so its using the file crsconfig file we created earlier...
LOCAL ADD MODE 
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding daemon to inittab
ACFS-9200: Supported
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-2672: Attempting to start 'ora.mdnsd' on 'appsractest'
CRS-2676: Start of 'ora.mdnsd' on 'appsractest' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'appsractest'
CRS-2676: Start of 'ora.gpnpd' on 'appsractest' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'appsractest'
CRS-2672: Attempting to start 'ora.gipcd' on 'appsractest'
CRS-2676: Start of 'ora.gipcd' on 'appsractest' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'appsractest' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'appsractest'
CRS-2672: Attempting to start 'ora.diskmon' on 'appsractest'
CRS-2676: Start of 'ora.diskmon' on 'appsractest' succeeded
CRS-2676: Start of 'ora.cssd' on 'appsractest' succeeded

Disk Group OCR_DISK creation failed with the following message:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/hdd2' matches no disks
ORA-15025: could not open disk "/dev/hdd2"
ORA-15056: additional error message
Configuration of ASM ... failed
see asmca logs at /u01/app/oracle/cfgtoollogs/asmca for details
Did not succssfully configure and start ASM at /u01/app/11.2.0.2/grid/crs/install/crsconfig_lib.pm line 6464.

The issue here is that oracleasm_disks parameter having invalid value.
fix - modified parameter for oracleasm_disks - 
from /dev/hdd1 to /dev/oracleasm/OCR_DISK disks

-- next run 
[root@appsractest grid]# /u01/app/11.2.0.2/grid/perl/bin/perl -I/u01/app/11.2.0.2/grid/perl/lib -I/u01/app/11.2.0.2/grid/crs/install /u01/app/11.2.0.2/grid/crs/install/rootcrs.pl 
Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'appsractest'
CRS-2676: Start of 'ora.cssdmonitor' on 'appsractest' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'appsractest'
CRS-2672: Attempting to start 'ora.diskmon' on 'appsractest'
CRS-2676: Start of 'ora.diskmon' on 'appsractest' succeeded
CRS-2676: Start of 'ora.cssd' on 'appsractest' succeeded
You need disks from at least two different failure groups, excluding quorum disks and quorum failure groups, to create a Disk Group with normal redundancy
Configuration of ASM ... failed

-- Since I'm using external redundancy that parameter needs to get modify from NORMAL to EXTERNAL
 fix - modified ASM_REDUNDANCY=EXTERNAL
-- Next run 
Disk Group OCR_DISK creation failed with the following message:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/oracleasm/disks' matches no disks
ORA-15014: path '/dev/oracleasm/disks/OCR_DISK' is not in the discovery set
ORA-15014: path '/dev/oracleasm/disks/DATA' is not in the discovery set


-- Disk discovery string needs to be fully qualified path as follows
 fix - modified ASM_DISCOVERY_STRING=/dev/oracleasm/* to ASM_DISCOVERY_STRING=/dev/oracleasm/disks/*

[root@appsractest grid]# /u01/app/11.2.0.2/grid/perl/bin/perl -I/u01/app/11.2.0.2/grid/perl/lib -I/u01/app/11.2.0.2/grid/crs/install /u01/app/11.2.0.2/grid/crs/install/rootcrs.pl 
Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'appsractest'
CRS-2676: Start of 'ora.cssdmonitor' on 'appsractest' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'appsractest'
CRS-2672: Attempting to start 'ora.diskmon' on 'appsractest'
CRS-2676: Start of 'ora.diskmon' on 'appsractest' succeeded
CRS-2676: Start of 'ora.cssd' on 'appsractest' succeeded
ASM created and started successfully.
Disk Group OCR_DISK created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 6b227d8c9a314fe5bf3ce025c322a476.
Successfully replaced voting disk group with +OCR_DISK.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   6b227d8c9a314fe5bf3ce025c322a476 (/dev/oracleasm/disks/OCR_DISK) [OCR_DISK]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'appsractest'
CRS-2676: Start of 'ora.asm' on 'appsractest' succeeded
CRS-2672: Attempting to start 'ora.OCR_DISK.dg' on 'appsractest'
CRS-2676: Start of 'ora.OCR_DISK.dg' on 'appsractest' succeeded
ACFS-9200: Supported
ACFS-9200: Supported
CRS-2672: Attempting to start 'ora.registry.acfs' on 'appsractest'
CRS-2676: Start of 'ora.registry.acfs' on 'appsractest' succeeded
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

At the end of the Oracle Clusterware installation, on each new node, manually run the configuration assistants and CVU. The following commands should be run from the first node only.
[oracle] $ /u01/app/11.2.0/grid/bin/netca \
                /orahome /u01/app/11.2.0/grid \
                /orahnam OraGridHome1 \
                /instype typical \
                /inscomp client,oraclenet,javavm,server\
                /insprtcl tcp \
                /cfg local \
                /authadp NO_VALUE \
                /responseFile /u01/app/11.2.0/grid/network/install/netca_typ.rsp \
                 /silent

[oracle@appsractest bin]$ /u01/app/11.2.0.2/grid/bin/netca /orahome /u01/app/11.2.0.2/grid /orahnam OraHome1Grid /instype typical /inscomp client,oraclenet,javavm,server /insprtcl tcp /cfg local /authadp NO_VALUE /responseFile /u01/app/11.2.0.2/grid/network/install/netca_typ.rsp /silent

Parsing command line arguments:
    Parameter "orahome" = /u01/app/11.2.0.2/grid
    Parameter "orahnam" = OraHome1Grid
    Parameter "instype" = typical
    Parameter "inscomp" = client,oraclenet,javavm,server
    Parameter "insprtcl" = tcp
    Parameter "cfg" = local
    Parameter "authadp" = NO_VALUE
    Parameter "responsefile" = /u01/app/11.2.0.2/grid/network/install/netca_typ.rsp
    Parameter "silent" = true
Done parsing command line arguments.
Oracle Net Services Configuration:
Oracle Net Listener Startup:
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

-- If you use a supported cluster file system, then you do not need to execute this command. If you are using Oracle ASM, then run the following command:
[oracle] $ /u01/app/11.2.0/grid/bin/asmca -silent -postConfigureASM -sysAsmPassword oracle -asmsnmpPassword oracle
-- Setup Oracle ASM password..
[oracle@appsractest bin]$ /u01/app/11.2.0.2/grid/bin/asmca -silent -postConfigureASM -sysAsmPassword oracle -asmsnmpPassword oracle
PostConfiguration completed successfully

Now if you check your Grid with CRS is up and running. Next step will be to clone Oracle RAC Binaries or Install them as per your need. I will put that topic in my next post.
One last thing is that you have to repeat this process for all the nodes on your destination cluster, so make sure you follow all the above mentioned steps. You can do some of this steps at a time on multiple nodes but doing them one by one will give you better control and ease of trouble shooting.

Note - If you a plan to run a pre-11g release 2 (11.2) database on this cluster, then you should run oifcfg as described in the Oracle Database 11g release 2 (11.2) documentation

Friday, October 12, 2012

PRKH-1010 : Unable to Communicate With CRS Services During Listener Configuration 

After installing the Oracle Binaries for stand alone server when I tried to manually create the listener after Net configuration assistant failed during installation, I hit following error. 
Though it was surprising that it was showing error of CRS on stand alone server!!!

This was due to the bug with 11201 binaries which was causing this issue. 
[oracle@oem ~]$ cd /u01/app/oracle/product/11.0/db_1/bin/
[oracle@oem bin]$ ./netca
oracle.ops.mgmt.cluster.ClusterException: PRKH-1010 : Unable to communicate with CRS services.
  [Communications Error(Native: prsr_initCLSS:[3])]
        at oracle.ops.mgmt.cluster.GetActiveNodes.<init>(GetActiveNodes.java:179)
        at oracle.ops.mgmt.cluster.GetActiveNodes.create(GetActiveNodes.java:221)
        at oracle.ops.mgmt.cluster.Cluster.getNodes(Cluster.java:313)
        at oracle.sysman.assistants.util.hasi.HAUtils.getNodes(HAUtils.java:1620)
        at oracle.sysman.assistants.util.hasi.HAUtils.getAccessibleNodes(HAUtils.java:1638)
        at oracle.net.ca.InitialSetup.configureOPS(NetCA.java:4526)
        at oracle.net.ca.InitialSetup.<init>(NetCA.java:4024)
        at oracle.net.ca.NetCA.main(NetCA.java:405)

Fix - 
This was due to ocr.loc file pointing to Shared device or ASM which is not hosted locally. 
so the ideas is to modify this behavior with local_only parameter set to TRUE.

[root@oem ~]# vi /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
#local_only=FALSE
local_only=TRUE

Once this done, when you invoke the configuration assistance this time around it works fine...
[oracle@oem bin]$ ./netca 
Oracle Net Services Configuration:
Configuring Listener:LISTENER
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@oem bin]$ ps -ef | grep lsnr
oracle   10886     1  0 15:16 ?        00:00:00 /u01/app/oracle/product/11.0/db_1/bin/tnslsnr LISTENER -inherit
oracle   12089  5982  0 15:24 pts/3    00:00:00 grep lsnr
[oracle@oem bin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-OCT-2012 15:24:30
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oem.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                11-OCT-2012 15:16:36
Uptime                    0 days 0 hr. 7 min. 54 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/oem/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oem.localdomain)(PORT=1521)))
Services Summary...
Service "oemdb" has 1 instance(s).
  Instance "oemdb", status READY, has 1 handler(s) for this service...
Service "oemdbXDB" has 1 instance(s).
  Instance "oemdb", status READY, has 1 handler(s) for this service...
The command completed successfully

Tuesday, October 9, 2012


Forms Run-time Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications/EBS 

Release 12 (12.1x and 12.2) now includes Oracle Application Server (OracleAS) 10g 10.1.2 as the foundation for Forms, Reports, and C code. This replaces the 8.0.6-based   ORACLE_HOME that 9iAS 1.0.2.2 provides today in Release 11i.

The Forms Runtime Diagnostic (FRD) is a method for capturing all events that occur in a form session and writing a file with the details of those events. There is overhead in writing this file, so you should only use this for the purposes of development and debugging

When a form is run with FRD enabled, a combination of external user-application interactions and internal Forms processing events are written in chronological order to a log on the file system.

Activating Forms Runtime Diagnostics (FRD)

Forms Runtime Diagnostics (FRD) can be enabled /activated in one of the following ways:

Option 1: Obtain FRD Trace Using Profile Options
Option 2: Obtain FRD Trace Using Appsweb.cfg

Option 1: Obtain FRD Trace Using Profile Options

When accessing Applications through the 'Home Page' (the page resultant after successful login)  there is no way to pass command line parameters such as record=all, etc. for the duration of a single session. This method enables users to run FRD tracing through the 'Home Page' by using the profile option 'ICX: Forms Launcher'. 

To start tracing in this way, modify Profile Option 'ICX: Forms Launcher' at USER level to include the Forms parameters required for FRD logging:

Note: 
* If the 'ICX: Forms Launcher' profile option is not updatable at the USER level, then you may need to access 'Application Developer' to set the option 'Updatable' for the profile 'ICX_FORMS_LAUNCHER' 
Step 1: Set the profile option 'ICX: Forms Launcher' at user level to same as site value
E.g. copy the site level value  for profile option 'ICX: Forms Launcher'  and paste it in user level field so as to set it at the user level 

Step 2: Append the user value of ICX: Forms Launcher with the Forms parameters for FRD  i.e  '?record=collect' 

http://hostname.domain:port/forms/frmservlet?record=collect

Step 3: Save this change at the USER level. 
Step 4: For trace file details and location
The FRD log file will be written  in the directory pointed by environment variable $FORMS_TRACE_DIR. By default, the trace file with name collect_<pid> gets written in $FORMS_TRACE_DIR , where <pid> is the process identifier.This is a simple text file and can be viewed directly

Option 2: Obtain FRD Trace Using Appsweb.cfg

When accessing Applications through the 'Home Page' (the page resultant after successful login)  there is no way to pass command line parameters such as record=forms/all, etc. for the duration of a single session. It is also possible to obtain FRD trace by  using Appsweb.cfg file.

To start tracing in this way, please refer to the steps below:

Step 1: Edit the appsweb.cfg file pointed by environment variable "FORMS_WEB_CONFIG_FILE"

Step 2: Forms parameters for FRD can be set in appsweb.cfg file in one of the following ways :

Look for  "record=" parameter after the 'ENVIRONMENT SPECIFIC PARAMETERS' section  and set it to collect  as shown below.
Once done login into Oracle Applications and launch forms via self-service. 

Extracts from appsweb.cfg file : 

# Sub argument for otherparams 
record=collect

In R12, the FRD log file will be written in the directory pointed by environment variable $FORMS_TRACE_DIR and one can specify the log filename with '.log'extension in one of the following ways: 

1. In appsweb.cfg:
Look for "log=" parameter after the 'ENVIRONMENT SPECIFIC PARAMETERS' section and set it with name that you want the trace file to be created with. 
E.g 
log=user1.log 

2. Using +log directive in the URL used to set the frd trace via profile options or in ad hoc way
E.g 
http://hostname.domain:port/forms/frmservlet?record=collect+log=user1.log

Thursday, October 4, 2012

Forms EAR Redeployment with txkrun.pl -script=CfgOC4JApp Failed

During OPMN startup the oaforms deployment failed and found the note suggesting the    redeployment of the forms as follows

[oracle@appsnode_new config]$ txkrun.pl -script=CfgOC4JApp
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/logs/appl/rgf/TXK/txkCfgOC4JApp_Fri_Aug_3_15_44_56_2012.log
Program : /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl started @ Fri Aug  3 15:44:56 2012
*** Log File = /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/logs/appl/rgf/TXK/txkCfgOC4JApp_Fri_Aug_3_15_44_56_2012.log
Enter Application name for re-deployment ? forms
Enter Oc4j Instance  password for re-deployment ?
Run Autoconfig <Yes/No> ? No
*****************************************************
Required values for starting OC4J instance "forms":
====================================================
s_formsstatus = enabled
s_forms_nprocs = 1 (value should be greater than 0)

Existing values from the context file:

======================================
s_formsstatus = enabled
s_forms_nprocs = 1
----------------------------------------------
*** Values for context variables are VALID ***
----------------------------------------------
*****************************************************
Stopping all OPMN processes.
OPMN stopped.
Errors encountered running /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl

*******FATAL ERROR*******

PROGRAM : /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl(/u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/bin/txkrun.pl)
TIME    : Fri Aug  3 15:45:11 2012
FUNCTION: TXK::Process::run [ Level 3 ]
MESSAGES:
Command error: <rc> = 32512, <command> = /u01/app/oracle/visr12/apps/tech_st/10.1.3/opmn/bin/opmnctl start

STACK TRACE shows following...

        TXK::Error::abort('TXK::Error','HASH(0x9971160)') called at /u01/app/oracle/visr12/apps/apps_st/appl/au/12.0.0/perl/TXK/Common.pm line 299
        TXK::Common::doError('TXK::Process=HASH(0xa8f2998)','Command error: <rc> = 32512, <command> = /u01/app/oracle/visr...','undef') called at /u01/app/oracle/visr12/apps/apps_st/appl/au/12.0.0/perl/TXK/Common.pm line 314
        TXK::Common::setError('TXK::Process=HASH(0xa8f2998)','Command error: <rc> = 32512, <command> = /u01/app/oracle/visr...') called at /u01/app/oracle/visr12/apps/apps_st/appl/au/12.0.0/perl/TXK/Process.pm line 449
        TXK::Process::run('TXK::Process=HASH(0xa8f2998)','HASH(0x9eb33f0)') called at /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl line 1587
        TXK::RunScript::execOPMNControl('HASH(0xa17e4ac)') called at /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl line 599
        require /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl called at /u01/app/oracle/visr12/apps/apps_st/appl/au/12.0.0/perl/TXK/RunScript.pm line 105
        TXK::RunScript::require('TXK::RunScript','/u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115...') called at /u01/app/oracle/visr12/apps/apps_st/appl/au/12.0.0/perl/TXK/Script.pm line 177
        eval {...} called at /u01/app/oracle/visr12/apps/apps_st/appl/au/12.0.0/perl/TXK/Script.pm line 177
 TXK::Script::run('TXK::Script=HASH(0xa260a00)','/u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/logs/app...','/u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115...') called at /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/bin/txkrun.pl line 174


Workaround :
This happens due to the patch mismatch or ambiguity in txkCfgOC4JApp.pl in Perl script

1. Backup file $FND_TOP/patch/115/bin/txkCfgOC4JApp.pl .
[oracle@appsnode_new bin]$  cp $FND_TOP/patch/115/bin/txkCfgOC4JApp.pl $FND_TOP/patch/115/bin/txkCfgOC4JApp.pl.bk
2. Replace the following line as follows :
$proc ->run ( { command => { text => "$oh/opmn/bin/opmnctl",
To
$proc ->run ( { command => { text => "/<BASE_PATH>/<SID>/inst/apps/<SID>_<hostname>/admin/scripts/adopmnctl.sh",
i.e. 
As per in my env..
$proc ->run ( { command => { text => "/u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/admin/scripts/adopmnctl.sh",
3. Rerun Rerun command

[oracle@appsnode_new bin]$ $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp


[oracle@appsnode_new bin]$ $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/logs/appl/rgf/TXK/txkCfgOC4JApp_Fri_Aug_3_16_08_01_2012.log
Program : /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl started @ Fri Aug  3 16:08:01 2012
*** Log File = /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/logs/appl/rgf/TXK/txkCfgOC4JApp_Fri_Aug_3_16_08_01_2012.log

Enter Application name for re-deployment ? forms
Enter Oc4j Instance  password for re-deployment ?
Run Autoconfig <Yes/No> ? No
*****************************************************
Required values for starting OC4J instance "forms":
====================================================
s_formsstatus = enabled
s_forms_nprocs = 1 (value should be greater than 0)
Existing values from the context file:
======================================
s_formsstatus = enabled
s_forms_nprocs = 1
----------------------------------------------
** Values for context variables are VALID ***
*****************************************************
Stopping all OPMN processes.
OPMN stopped.
OPMN started.
Deplolying Application : "forms" onto OC4J instance: "forms"
Application deployed successfully.
Stopping and starting OC4J instances.
Started OC4J instances.
Binding webApp : "forms" with webmodule : "formsweb" for OC4J instance: "forms"
Web application bound successfully.
Stopping OPMN.
OPMN stopped.
Program : /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl completed @ Fri Aug  3 16:08:41 2012
End of /u01/app/oracle/visr12/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkCfgOC4JApp.pl : No Errors encountered

[oracle@appsnode_new bin]$ adautocfg.sh
Enter the APPS user password:
The log file for this session is located at: /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/admin/log/08031615/adconfig.log
AutoConfig is configuring the Applications environment...
AutoConfig will consider the custom templates if present.
        Using CONFIG_HOME location     : /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new
        Classpath                   : /u01/app/oracle/visr12/apps/apps_st/comn/java/lib/appsborg2.zip:/u01/app/oracle/visr12/apps/apps_st/comn/java/classes
        Using Context file          : /u01/app/oracle/visr12/inst/apps/visr12_appsnode_new/appl/admin/visr12_appsnode_new.xml
Context Value Management will now update the Context file.

Since Auto Config ran successfully this the opmn will start fine too....