Saturday, March 12, 2011

R12: adgentns.pl fails with AC-50480: Internal error occurred: java.lang.Exception: Error while generating

R12: adgentns.pl fails with AC-50480: Internal error occurred: java.lang.Exception: Error while generating listener.ora [ID 453901.1]




Applies to:

Oracle Applications Manager - Version: 12.0.2
Information in this document applies to any platform.
Checked for relevance on 02-FEB-2010

Symptoms

When attempting to run autoconfig, the following error occurs :
...
Updating s_tnsmode to 'generateTNS'
UpdateContext exited with status: 0
AC-50480: Internal error occurred: java.lang.Exception: Error while generating listener.ora.
Error generating tnsnames.ora from the database, temporary tnsnames.ora will be generated using
templates
Instantiating Tools tnsnames.ora
Tools tnsnames.ora instantiated
Web tnsnames.ora instantiated

adgentns.pl exiting with status 512
ERRORCODE = 512 ERRORCODE_END
...

Cause

Same issue is addressed in non-public Bug 5592152 -  'ARE120.13:OAM:APPS LISTENER FAILS TO COME UP AFTER R12 INSTALL'.

Issue seems to be occurring due to wrong node_name values in fnd_concurrent_queues table.

Solution

To implement the solution, please execute the following steps :

1. Open a new shell and source the APPS Environment.

2. Start the sqlplus Utility and execute following commands :
sqlplus apps/<Password>
exec fnd_conc_clone.setup_clean

3. Open a new shell and source the DB-Tier Environment.

4. Execute Autoconfig at the DB-Tier.

5. Switch to the Shell with the APPS Enviornment sourced or start a new Shell and source the APPS Environment.

6. Execute Autoconfig at the APPS-Tier.

7. Retest the Services startup.

Thursday, March 3, 2011

Importance of Adpreclone and Adcfgclone in DB & Apps Tier's

What happens when you run adpreclone and adcfgclone. The below steps give you better understanding and enhance your troubleshooting skills.

When you run this commnad adpreclone.pl dbTier . This will run in two steps Techstack and database.

Techstack:It will create following directories in the ORACLE_HOME/appsutil/clone
Jlib, db, data where “Jlib” relates to libraries “db” will contain the techstack information, “data” will contain the information related to datafiles and required for cloning.
Creates driver files at ORACLE_HOME/appsutil/driver/instconf.drv

Converts inventory from binary to xml, the xml file is located at $ORACLE_HOME/appsutil/clone/context/db/Sid_context.xml

Prepare database for cloning:
This includes creating datbase control file script and datafile location information file at
$ORACLE_HOME/appsutil/template
adcrdbclone.sql, dbfinfo.lst

Generates database creation driver file at ORACLE_HOME/appsutil/clone/data/driver
data.drv

Copy JDBC Libraries at ORACLE_HOME/appsutil/clone/jlib/classes12.jar and appsoui

When Running adpreclone appsTier

This will create stage directory at $COMMON_TOP/clone. This also run in two steps.

Techstack:
Creates template files for
Oracle_iAS_Home/appsutil/template
Oracle_806_Home/appsutil/template

Creates Techstack driver files for
IAS_ORACLE_HOME/appsutil/driver/instconf.drv
806_ORACLE_HOME/appsutil/driver/instconf.drv

APPL_TOP preparation:
-It will create application top driver file$COMMON_TOP/clone/appl/driver/appl.drv
-Copy JDBC libraries$COMMON_TOP/clone/jlib/classes111.zip

Now Shutdown all the services of Application and database for Copy the file System to target location

Configuring the target system
Once it is done . Run as below adcfclone.pl for apps Tier and dbTier.

On database side:
cd $ORACLE_HOME/appsutils/clone/binperl adcfgclone.pl dbTier pwd=apps
This will use the templates and driver files those were created while running adpreclone.pl on source system and has been copied to target system.

Following scripts are run by adcfgclone.pl dbTier for configuring techstack

adchkutl.sh — This will check the system for ld, ar, cc, and make versions.
adclonectx.pl — This will clone the context file. This will ceate a new context file as per the details of this instance.
runInstallConfigDriver — located in $Oracle_Home/appsutil/driver/instconf.drv
Relinking $Oracle_Home/appsutil/install/adlnkoh.sh — This will relink ORACLE_HOME

For data on database side, following scripts are run
Driver file $Oracle_Home/appsutil/clone/context/data/driver/data.drv
Create database adcrdb.zip
Autoconfig is run
Control file creation adcrdbclone.sql

On Application Side:
COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier pwd=apps
Following scripts are run by adcfgclone.pl
Creates context file for target adclonectx.pl

Run driver files
$ORACLE_HOME/appsutil/driver/instconf.drv
$IAS_ORACLE_HOME/appsutil/driver/instconf.drv

Relinking of Oracle Home$ORACLE_HOME/bin/adlnk806.sh$IAS_ORACLE_HOME/bin/adlnkiAS.sh
At the end it will run the driver file $COMMON_TOP/clone/appl/driver/appl.drv and then runs autoconfig.

Autoconfig in Oracle Applications 11i & R12.

In Oracle Applications 11i & R12 (12i) all the configuration parameters are captured in two context files:
Application context file called the <CONTEXT_NAME>.xml contains the configuration information for the application tier & is located in $APPl_TOP/admin for each node of application tier.
Database context file called the <CONTEXT_NAME>.xml contains the configuration information for the database tier & is located in $ORACLE_HOME/appsutil/.
Details stored in the context file contains host names,domain name , directory structure, port numbers used  ……
The AutoConfig feature of Oracle application manager(OAM) is used to update & manage context files.
Updating Context file
Suppose we want to update the active port from <original port no.> to 80 , for this we will edit the application context file as follows:
Step 1 :Start all services
$ $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<apps password>
$ADMIN_SCRIPTS_HOME/adstrtall.sh apps/appspwd.
Step 2 :log on to OAM & click site map.
Step 3:Click AutoConfig from the list of System Configuration features in the Administration tab.
Step 4 : Click the Edit Parameter button for the application tier context file to access the Context File Parameters page & then click the system tab.
Step 5 : Click the Focus icon (blue triangle) for oa_web_server. This expands oa_web_server and shows the web server related parameters.
Step 6:Update the Web Port (s_active_webport) parameter from < Original port number> to 80.
Step 7 : Save it & answer the tab.Then logout of OAM
AutoConfig Script
The autoconfig script uses information from the context file to generate all applications configuration files & updates database profiles. It is located in
Application tier: $COMMON_TOP/admin/scripts/CONTEXT_NAME/adautoconfig.sh
$ADMIN_SCRIPTS_HOME/adautocfg.sh

Database tier: $ORACLE_HOME/appsutil/scripts/CONTEXT_NAME/adautoconfig.sh
Now we run the autoconfig script to reconfigure the oracle application system with the updated Applications context.
Step 1 : Stop all services
$ $COMMON_TOP/admin/scripts/<context_name>/adstpall.sh APPS/<apps password>(OR)
$ADMIN_SCRIPTS_HOME/adstpall.sh apps/appspwd.
Step 2:Run the autoconfig script, $adautocfg.sh & respond to the prompts.
Step 3:Check log files for any errors.log file for autoconfig is adconfig.log & is located in
<APPL_TOP>/admin/<context_name>/log/MMDDhhmm/
Step 4: Restart all services :
$ $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<apps password>(OR)
$ADMIN_SCRIPTS_HOME/adstrtall.sh apps/appspwd.
Rolling back an autoconfig session
Each execution of AutoConfig creates a roll back script in case you want to revert back to the previous configuration settings. For this we perform the following steps:
Step 1 :Shut down all services:
$ cd $COMMON_TOP/admin/scripts/<context_name>(OR)
$ADMIN_SCRIPTS_HOME/adstpall.sh apps/appspwd.
$ adstpall.sh APPS/<APPS password>
Step 2:Restore AutoConfig session.
$ cd $APPL_TOP>/admin/<context_name>/out/MMDDhhmm
$ restore.sh
Step 3 : Restart all services:
$ $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<APPS password>(OR)
$ADMIN_SCRIPTS_HOME/adstrtall.sh apps/appspwd.
Restoring the AutoConfig updated files and restarting the services allows you to log on to OAM.

Restoring the previous configuration

Now we run OAM AutoConfig to restore the Applications Context.
Step 1 :Log on to the Oracle Application Manager (OAM) & click site map.You will be able to log on but some services will be down.
Step 2: Click AutoConfig from the list of System Configuration features in the Administration tab.
Step 3 : Click the Show History button for the application tier context file to access the Context File History page.
Step 4 :Click the Show Differences from Current Configuration button to see the recently updated parameters & Select Restore Previous Value for the Web Port and Discoverer Port parameters.
Step 5 :Save & respond the tabs. Log out of OAM.
Step 6 :Shut down all services:
$ cd $COMMON_TOP/admin/scripts/<context_name>(OR)
$ADMIN_SCRIPTS_HOME/adstpall.sh apps/appspwd
$ adstpall.sh APPS/<APPS password>
Step 7 :Run the AutoConfig script, adautocfg.sh & Respond to the prompts.
Step 8 : View the log file and check for any errors.
Step 9 : Restart all services:
$ $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<APPS password>(OR)
$ADMIN_SCRIPTS_HOME/adstrtall.sh apps/appspwd.
Step 10 :Log on to the Oracle Application Manager (OAM)
If the status of some services appears to be down, click the Refresh icon to update the
statup