How to clear Middle Tier cache in R12

Go to “Functional Administrator” responsibility à Select “Core Services” (If missing, assign ‘Functional Administrator’ responsibility to your account)

c1.jpg

OR

c2.jpg
Select “Caching Framework
Select “Global Configuration
Now click on “Clear cache
Click on “Yes” button to confirm
Click on “Apply” button to clear the cachec3.jpg

c4.jpg

 Source: How to Clear the Cache Using Functional Administrator? (Doc ID 759038.1)

 Note: If you have removed the _pages manually and are facing login issue that’s blank screen.
Use the ojspcompile.pl perl script to perform a manual pre-compilation of the JSP pages.The following command will compile all the JSP pages and build up the JSP cache again.
            perl $FND_TOP/patch/115/bin/ojspCompile.pl –compile –flush -p 2
This utility is also used by the AD utilities to perform this action such as when patches are applied that replace one or more JSP pages

See Note: JSP Pages Hanging in R12 After Removing Cached Class Files in _pages (Doc ID 433386.1)

Passwordless SSH connection setup between Linux Nodes

What is SSH: Secure Shell (SSH) is an open source cryptographic network protocol for operating network services securely over an unsecured network. The best-known example application is for remote login to computer systems by users. SSH provides a secure channel over an unsecured network in a client-server architecture, connecting an SSH client application with an SSH server.

What is SSH-KEYGEN: ssh-keygen is a standard component of the Secure Shell (SSH) protocol suite found on Unix and Unix-like computer systems used to establish secure shell sessions between remote computers over insecure networks, through the use of various cryptographic techniques. The ssh-keygen utility is used to generate, manage, and convert authentication keys. ssh-keygen is able to generate a key using one of three different digital signature algorithms.

Test Case: In our example, we will setup SSH password-less automatic login from server user1@tstserver001 to server user2stserver002
SSH Client: user1@tstserver001
SSH Remote Host: user2stserver002

  1. Frist attempt to log in without setting up SSH keys, we will be prompted for the password.

ssh1

 

Now let’s create a SSH Key on user1@tstserver001

ssh2.jpg

 Now that our Public Key has been created (/home/user1/.ssh/id_rsa.pub), we can now upload that to any node to setup Password-less connection.

2. Create .SSH directory on user2@tstserver2 if it doesn’t exist.

ssh3.jpg

3. Upload and append the Public Key (id_rsa.pub) on server user2@tstserver2

ssh4.jpg

4. Set Permissions on Remote Host (user2@tstserver002)

ssh5.jpg

 

  • Alternate ways to do Step 3 and 4, you also Secure Copy the Public Key (id_rsa.pub) file and then append.ssh6.jpg

5. Test Logging in from [user1@tstserver001]$ to [user2@tstserver002]

From now, you can log in to [user2@tstserver002] from [user1@tstserver001] without the password.

ssh7.jpg

 

How to enable Diagnostics in Oracle Applications R12

Users may not able to able to see Help >Diagnostics option or get an error “Function Not Available to this Responsibility. Please check with your system administrator.”

These profiles need to be set at user level. So specific user can access this functionality (ex. Support folks/Developers)

Navigation: Go to System Administrator responsibility
Profile> System

Profile Option Name: Utilities:Diagnostics
User Level: Yes

diag2.jpg

Profile Option Name: Hide Diagnostics menu entry
User Level: NO

diag1.jpg
Save changes
Have user logout of Oracle Application and login again

User should be able to access Help >Diagnostics Menu

diag3.jpg

 

Concurrent program to bounce Mobile Warehouse Applications (MWA)

Scope: Create a Concurrent program to bounce Mobile Warehouse Applications (MWA)

Shell Program for MWA Bounce on the Server

First, create a shell script on the Application server.

 #!/bin/bash
# mwa_bounce.sh 03/29/2016 RG

echo “Following are System Parameters”
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
p0=$0
p1=$1
p2=$2
p3=$3
p4=$4
echo “1st System Parameter :”$p0
#echo “2nd System Parameter :”$p1
echo “3rd System Parameter :”$p2
echo “4th System Parameter :”$p3
echo “5th System Parameter :”$p4
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “Following are User Parameters “
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
#u1=$5
#echo “1st User Parameter :”$u1
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”

echo “Stopping MWA Server via “$p0
echo
nohup $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh stop $p1
echo $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh stop APPS

mail -s “Concurrent Request “$p4” Submitted to Bounce MWA by “$p3 ramesh.ganesan@mycompany.com< /dev/null

sleep 30

# Kill MWADIS

for pids in `ps -fu appldev|grep MWADIS|grep -v “grep”|awk ‘{print $2}’`
do
echo “forcing kill on MWADIS PID ${pids}”
kill -9 ${pids}
done

# Kill telnet
for pids in `ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $2}’`
do
#DTL=`ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $15}’` # 11i
DTL=`ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $17}’` # R12.2
echo “forcing kill on PID ${pids} for ${DTL}”
kill -9 ${pids}
done

sleep 30

echo “Starting MWA Server via “$p0
echo $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh start APPS
echo
rm -rf /tmp/mwa_alert.txt
touch /tmp/mwa_alert.txt
nohup $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh start $p1 |tee /tmp/mwa_alert.txt

# if the dispatcher isn’t free, email me

MWAERROR=`cat /tmp/mwa_alert.txt | grep “is not free to start the dispatcher”`

if [ ! -z “$MWAERROR” ]
then
echo $MWAERROR | mail -s “MWA Error” ramesh.ganesan@brakepartsinc.com
fi

Copy the program to $CUSTOM_TOP/bin and create Soft link

cd $XXBPI_TOP/bin
[appldev@uswodapp013 bin]$ ln -s /ua4001/appl/fnd/12.0.0/bin/fndcpesr mwa_bounce

Create Concurrent Program Executable

As SYSADMIN, define the Executable via Concurrent->Program->Executable

mwa1

Create Concurrent Program Definition

sysadmin, define the Executable via Concurrent->Program->Define

mwa2

Assign a Request Group

Security->Responsibility->Request

mwa3

Submit the Request and view Log file and verify Email

mwa4

 

Log file

mwa5

Email output

mwa6

Program Definition and Request Group can be downloaded and uploaded to other EBS instances with MWA

Program Definition Download

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxbpi_mwa_bounce_prgm.ldt PROGRAM APPLICATION_SHORT_NAME=”XXBPI_MWA_BOUNCE” CONCURRENT_PROGRAM_NAME=”XXBPI_MWA_BOUNCE”

Upload

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct xxbpi_mwa_bounce_prgm.ldt

Request Group Download

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct xxbpi_system_admin_reports_reqgrp.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”System Administrator Reports” APPLICATION_SHORT_NAME=”FND”

Upload

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct xxbpi_system_admin_reports_reqgrp.ldt

R12-Increase Java Heap Size and JVM

Current Settings

[applmgr@uswodapq03 scripts]$ ./adoacorectl.sh status | grep “OC4J:oacore” | awk -F”|” ‘{print $3}’ | while read L ; do ps -fp $L | grep -v PID ; done | awk -F”-X” ‘{print $2 $3}’
mx512M ms128M

Shows we have 1 JVM with 512 as MX and 128 as MS.

Scope is to increase the JVM to 2 and Increase the Memory size.

Steps – Modify $Context_File

[applmgr@uswodapq03 ~]$ grep oacore_nprocs $CONTEXT_FILE
<oacore_nprocs oa_var=”s_oacore_nprocs”>1</oacore_nprocs>

[applmgr@uswodapq03 ~]$ grep s_oacore_jvm_start_options $CONTEXT_FILE
<oacore_jvm_start_options oa_var=”s_oacore_jvm_start_options”>-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/ebsqa/applmgr/inst/apps/ebsqa_uswodapq03/ora/10.1.3/j2ee/oacore/config/jazn.xml</oacore_jvm_start_options>

—–change the heap size as below and increase jvm to 2.
-Xmx1024M -Xms512M -XX:MaxPermSize=256M

[applmgr@uswodapq03 admin]$ grep s_oacore_jvm_start_options $CONTEXT_FILE
<oacore_jvm_start_options oa_var=”s_oacore_jvm_start_options”>-server -verbose:gc -Xmx1024M -Xms512M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/ebsqa/applmgr/inst/apps/ebsqa_uswodapq03/ora/10.1.3/j2ee/oacore/config/jazn.xml</oacore_jvm_start_options>

[applmgr@uswodapq03 admin]$ grep oacore_nprocs $CONTEXT_FILE
<oacore_nprocs oa_var=”s_oacore_nprocs”>2</oacore_nprocs>

Stop and Start Application Services

cd $ADMIN_SCRIPTS_HOME
./adautocfg.sh

adopmnctl.sh stopall
adopmnctl.sh startall

After Changes- increased Heap memory with 2 JVM
[applmgr@uswodapq03 scripts]$ ./adoacorectl.sh status | grep “OC4J:oacore” | awk -F”|” ‘{print $3}’ | while read L ; do ps -fp $L | grep -v PID ; done | awk -F”-X” ‘{print $2 $3}’
mx1024M ms512M
mx1024M ms512M
Emergency fix – quick solution
Just in case you need to fix an issue quickly, you may want to edit $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml file directly and restart OPMN processes to enable new parameters.

<data id=”java-options” value=”-server -verbose:gc -Xmx1024M -Xms512M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+Use
TLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt
.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/ebsqa/applmgr/inst/apps/ebsqa_uswodapq03/ora/10.1.3/j2ee/oacore/config/jazn.xml -Dhttp
.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies”/>

<process-type id=”oacore” module-id=”OC4J” status=”enabled” working-dir=”$ORACLE_HOME/j2ee/home”>
<process-set id=”default_group” numprocs=”2″/>
Make sure to edit $CONTEXT_FILE to keep it in sync.

EBS R12 – OPP Out of Memory Error

Cause: Oracle EBS Reports are ending in Warning.
Concurrent Logs having an OPP error:

+—————————————————————–+
Executing request completion options…
Output file size: 4323
+————- 1) PUBLISH ————-+
Unable to find an Output Post Processor service to post-process request 10225428. Check that the Output Post Processor service is running.
+————————————–+

+————- 2) PRINT ————-+
Not printing the output of this request because post-processing failed.
+————————————–+
Finished executing request completion options.
+—————————————————————–+

Check the Concurrent OPP Logs.

NOTE: If 2 threads enabled, then there will be 2 log files.

Logfile Location:

ls -ltr $APPLCSF/$APPLLOG/FNDOPP*
FNDOPP74655.txt
FNDOPP74654.txt

OR

ps -ef | grep OPP

applebs 15024 6778 17 13:00 ? 00:04:32 /us1001/product/10.1.3/appsutil/jdk/bin/java -DCLIENT_PROCESSID=15024 -server -Xmx384m -XX:NewRatio=2 -XX:+UseSerialGC -Doracle.apps.fnd.common.Pool.leak.mode=stderr:off -verbose:gc -mx2048m -Ddbcfile=/ua1002/inst/apps/bpiprd_uswodapp002/appl/fnd/12.0.0/secure/bpiprd.dbc -Dcpid=74654 -Dconc_queue_id=6269 -Dqueue_appl_id=0 –Dlogfile=/ua1002/inst/apps/bpiprd_shared/logs/appl/conc/log/FNDOPP74654.txt –DLONG_RUNNING_JVM=true -DOVERRIDE_DBC=true -DFND_JDBC_BUFFER_MIN=1 -DFND_JDBC_BUFFER_MAX=2 oracle.apps.fnd.cp.gsf.GSMServiceController

applebs 15026 6778 4 13:00 ? 00:01:15 /us1001/product/10.1.3/appsutil/jdk/bin/java -DCLIENT_PROCESSID=15026 -server -Xmx384m -XX:NewRatio=2 -XX:+UseSerialGC -Doracle.apps.fnd.common.Pool.leak.mode=stderr:off -verbose:gc -mx2048m dbcfile=/ua1002/inst/apps/bpiprd_uswodapp002/appl/fnd/12.0.0/secure/bpiprd.dbc -Dcpid=74655 -Dconc_queue_id=6269 -Dqueue_appl_id=0 –Dlogfile=/ua1002/inst/apps/bpiprd_shared/logs/appl/conc/log/FNDOPP74655.txt -DLONG_RUNNING_JVM=true -DOVERRIDE_DBC=true -DFND_JDBC_BUFFER_MIN=1 -DFND_JDBC_BUFFER_MAX=2 oracle.apps.fnd.cp.gsf.GSMServiceController

Log has following errors.

[5/18/16 12:57:04 PM] [UNEXPECTED] [74607:RT10225399] java.lang.OutOfMemoryError: Java heap space
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1382)
at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:438)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at oracle.ias.cache.group.HttpPacket.<init>(Unknown Source)
at oracle.ias.cache.group.StreamHandler.write(Unknown Source)
at oracle.ias.cache.group.EndPoint.write(Unknown Source)
at oracle.ias.cache.group.Transport.syncSend(Unknown Source)
at oracle.ias.cache.group.Sender.execute(Unknown Source)
at oracle.ias.cache.group.Sender.run(Unknown Source)

Troubleshooting

Option 1, patching

12i Environments:
1. Please download,review and apply Patch 7687414 in a test environment.
3. Please retest the issue.
4. If the issue is resolved, please migrate the solution as appropriate to other environments.

Option 2, Increase the maximum Java heap size for the OPP to 1024MB (1GB):

Determine what the heap size per OPP process is currently:

select DEVELOPER_PARAMETERS from FND_CP_SERVICES
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = ‘FNDCPOPP’);

-The default should be:

J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m

3. Increase the Heap Space per Process to 1024:

update FND_CP_SERVICES
set DEVELOPER_PARAMETERS =
‘J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx1024m
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = ‘FNDCPOPP’);
OR
1. Log into applications with the System Administrator responsibility.
2. Navigate to Concurrent -> Program -> Define
3. Query the XML Publisher Template Re-Generator program
4. Set the following value for the Executable Options : -Xmx1024m
5. Save changes.
6. Retest the program.
The OPP queue can be Recreated the using $FND_TOP/patch/115/sql/afopp002.sql file as ‘APPLSYS’ user. On running the script you will be prompted for username and password.
Option 3, Check timeout settings.
There are two new profiles options that can be used to control the timeouts:
Profile Option : Concurrent:OPP Response Timeout Internal Name : CONC_PP_RESPONSE_TIMEOUT Description : Specifies the amount of time a manager waits for OPP to respond to its request for post processing.
Profile Option : Concurrent:OPP Process Timeout Internal Name : CONC_PP_PROCESS_TIMEOUT Description : Specifies the amount of time the manager waits for the OPP to actually process the request.
Option 4,  Configure the XML Publisher Administrator Configuration settings.
Note: Reports built with large images will require additional space.  So please insure there is adequate temp space and your code is optimized when running large reports/templates.
1. As XML Publisher Administrator navigate to Administration->Configuration.
2. Under Temporary Directory pick a temporary file location on your concurrent processing node. This should be at least 5GB or 20x larger than largest XML data file you generate
3.  Under FO Processing, set:
o Use XML Publisher’s XSLT processor set to True
o Enable scalable feature of XSLT processor set to False
o Enable XSLT runtime optimization set to True
Bounce OPP processes.
Additional Info: Review below Meta link Documents.
Doc ID 1268217.1
Doc ID 862644.1]
Doc ID 1266368.1
Doc ID 427233.1
Doc ID 352518.1
Doc ID 978495.1

AWS Cloud and Oracle Database

Amazon Web Services (AWS) provides 2 types of services.

  1. Amazon Relational Database Service (RDS) which is fully managed service. Few clicks you got the Database up and running and scalable with few clicks. All the backup’s, patching, storage and high availability are managed by AWS.
  2. Amazon Elastic Compute Cloud (EC2) allows full control over setup of infrastructure and database. So we will be in charge of backup’s, patches, storage provisioning…etc.

There are 2 options of pricing, one with Amazon’s Oracle license included and the other with Bring your own license. Prices are reasonable and it’s per hour usage. https://aws.amazon.com/rds/oracle/pricing/

Amazon RDS and EC2 Available for Oracle, MySql, Sql server. OS, Linux, RHEL, SLES, Windows, SQL are available.

Amazon Relational Database Service (RDS) is a managed database service. RDS makes it easy to set up, operate, and scale Oracle Database deployments in the cloud. With Amazon RDS, you can deploy multiple editions of Oracle Database in minutes with cost-efficient and re-sizable hardware capacity. Amazon RDS frees you up to focus on application development by managing time-consuming database administration tasks including provisioning, backups, software patching, monitoring, and hardware scaling.

Amazon EC2, has 3 types of pricing involved depending on the type of instance you choose (On-demand, Reserved, and Spot Instances) and all are pay for what you use method.

AWS free usage FAQ – https://aws.amazon.com/free/faqs/

Attached are 2 examples of Oracle DB setup using EC2 and RDS. Also attached few PDF for reference.

Create instance in EC2 in AWSCreate Oracle RDS instance in Amazon

Create Oracle RDS instance in Amazon