Search This Blog

Sunday, December 25, 2016

database is connecting from apps tier in R12

Today i got the error below after running fnd_nodes cleanup.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory

I was able to connect to database and autoconfig ran fine in db tier. But it was throwing the above error in apps tier and i was unable to connect to db from apps tier. database was up and running fine.
Honestly i was not sure about the cause of this error. As i checked the xml file. DBC file, tnsname and listener file i could not figure out anything.

Cause of the error :

This is due to db restricted session. In order to run adstats.sql i had to enable restricted session. But i dint disable it after adstats.sql. Thats what causing the issue.

Fix :

Simply i bounced the db once since i could not figure out the cause of the issue while troubleshooting. After that this error disappeared.

Also we can do the below to avoid this error and no need of bounce,

SQL> alter disable restricted session;



Tuesday, December 20, 2016

How to find process id which is using specific port?

This script will simply give you which process is exactly using your port. Just copy the script in a shell and execute.You need to supply port value as an input while executing the script.

Ex : ./script_name.sh 7213

Script get_port_pid.sh:

#!/bin/bash

# Get the process which listens on port
# $1 is the port we are looking for
if [ $# -lt 1 ]
then
echo "Please provide a port number parameter for this script"
echo "e.g. $0 22"
exit
fi
echo "Greping for your port, please be patient (CTRL+C breaks) ... "

for i in `ls /proc`
do
pfiles $i | grep AF_INET | grep $1
if [ $? -eq 0 ]
then
echo Is owned by pid $i
fi
done

RC-50221: Warning: Port pool not free in R12 while running adcfgclone.pl

I was getting the error below while running adcfgclone in R12.2 for run file system. While selecting the port pool value, i was getting the error saying one of the port pool is not free. upon checking the logs i found out OACORE (port no - 7213) is used by some processes which is causing this issue.

Error from the log :

Checking  WLS Admin Server Port on ahqtest:  Port Value = 7013
   WLS Admin Server Port available:  Port Value = 7013
 Checking  WLS OACORE Application Port on ahqtest:  Port Value = 7213
RC-50204: Error: - WLS OACORE Application Port in use: Port Value = 7213

I tried to figure out the process with the below commands but i could not figure out which process exactly using 7213.

bash-3.2$ netstat -an|egrep "7213"
10.171.17.18.7213          *.*                0      0 49152      0 LISTEN

Upon surfing i figure out the below useful shell script. This script will simply give you which process is exactly using your port. Just copy the script in a shell and execute.You need to supply port value as an input while executing the script.

Ex : ./script_name.sh 7213

Script get_port_pid.sh:

#!/bin/bash

# Get the process which listens on port
# $1 is the port we are looking for
if [ $# -lt 1 ]
then
echo "Please provide a port number parameter for this script"
echo "e.g. $0 22"
exit
fi
echo "Greping for your port, please be patient (CTRL+C breaks) ... "

for i in `ls /proc`
do
pfiles $i | grep AF_INET | grep $1
if [ $? -eq 0 ]
then
echo Is owned by pid $i
fi
done



Get the process id and kill it from OS level and re-run adcfgclone.pl script.

Thanks!

How to attach db oracle home to central inventory?


Summary :

I was getting the error below when i tried the check lsinventory. It is due to oracle home was not registered with the central inventory. We are having solaris servers and we can find the inventory location through $ORACLE_HOME/oraInst.loc or /var/opt/oracle/oraInst.loc.


bash-3.2$ /d02/DEV/oratest/11204/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.15
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /d02/DEV/oratest/11204
Central Inventory : /var/opt/oracle/oraInventory
   from           : /d02/DEV/oratest/11204/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log

List of Homes on this system:

  Home name= OH375238208, Location= "/d02/DEV/appltest/fs2/FMW_Home/oracle_common"
  Home name= OH6845398, Location= "/d02/DEV/appltest/fs2/FMW_Home/webtier"
  Home name= OH639747260, Location= "/d02/DEV/appltest/fs2/FMW_Home/Oracle_EBS-app1"
  Home name= DEV_TOOLS__d02_DEV_appltest_fs2_EBSapps_10_1_2, Location= "/d02/DEV/appltest/fs2/EBSapps/10.1.2"
LsInventorySession failed: RawInventory gets null OracleHomeInfo

OPatch failed with error code 73


From the error message we can find out that current running oracle home '/d02/DEV/oratest/11204' was not listed in the inventory.

Below log will give your more info on the registered oracle homes in the invetory.

 vi /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log
"/d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log" 31 lines, 2853 characters
[Dec 19, 2016 2:25:30 PM]    OUI exists, the oraclehome is OUI based.
[Dec 19, 2016 2:25:30 PM]    OUI exists, the oraclehome is OUI based.
[Dec 19, 2016 2:25:30 PM]    OPatch invoked as follows: 'lsinventory -invPtrLoc /d02/DEV/oratest/11204/oraInst.loc '
[Dec 19, 2016 2:25:30 PM]    OUI-67077:
                             Oracle Home       : /d02/DEV/oratest/11204
                             Central Inventory : /var/opt/oracle/oraInventory
                                from           : /d02/DEV/oratest/11204/oraInst.loc
                             OPatch version    : 11.2.0.3.15
                             OUI version       : 11.2.0.4.0
                             OUI location      : /d02/DEV/oratest/11204/oui
                             Log file location : /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log
[Dec 19, 2016 2:25:30 PM]    Patch history file: /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch_history.txt
[Dec 19, 2016 2:25:30 PM]    Starting LsInventorySession at Mon Dec 19 14:25:30 AST 2016
[Dec 19, 2016 2:25:31 PM]    List of Homes on this system:

                               Home name= OH375238208, Location= "/d02/DEV/appltest/fs2/FMW_Home/oracle_common"
                               Home name= OH6845398, Location= "/d02/DEV/appltest/fs2/FMW_Home/webtier"
                               Home name= OH639747260, Location= "/d02/DEV/appltest/fs2/FMW_Home/Oracle_EBS-app1"
                               Home name= DEV_TOOLS__d02_DEV_appltest_fs2_EBSapps_10_1_2, Location= "/d02/DEV/appltest/fs2/EBSapps/10.1.2"
[Dec 19, 2016 2:25:31 PM]    OUI-67073:LsInventorySession failed: RawInventory gets null OracleHomeInfo
[Dec 19, 2016 2:25:31 PM]    Finishing LsInventorySession at Mon Dec 19 14:25:31 AST 2016
[Dec 19, 2016 2:25:31 PM]    Stack Description: java.lang.RuntimeException: RawInventory gets null OracleHomeInfo
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.RawInventory.loadRawInventory(RawInventory.java:207)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.RawInventory.init(RawInventory.java:171)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.RawInventory.getInstance(RawInventory.java:87)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.IPMReadServices.getRawInventory(IPMReadServices.java:149)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.IPMReadServices.loadInventory(IPMReadServices.java:1031)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.LsInventorySession.process(LsInventorySession.java:317)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.OPatchSession.process(OPatchSession.java:2042)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.OPatch.process(OPatch.java:796)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.OPatch.main(OPatch.java:846)

To check the registered oracle homes within the central inventory, please check the inventory.xml file below.

cd /var/opt/oracle/oraInventory/ContentsXML/

open inventory.xml 

Below are the steps to register oracle home with central inventory.

bash-3.2$ cd $ORACLE_HOME/oui/bin

Make sure you have sourced the env file or provide entire oracle home location in the ORACLE_HOME variable.

bash-3.2$ ./runInstaller -silent -attachHome -invPtrLoc /var/opt/oracle/oraInst.loc
ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=ORAHOME11Gr23


Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 45917 MB    Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /var/opt/oracle/oraInventory
/var/opt/oracle/oraInventory/ContentsXML/inventory.xml (Permission denied)
'AttachHome' failed.

bash-3.2$ ll /var/opt/oracle/oraInventory/ContentsXML/inventory.xml

bash-3.2$ ls -ltr /var/opt/oracle/oraInventory/ContentsXML/inventory.xml
-rw-r-----   1 appltest oinstall     984 Dec 15 16:17
/var/opt/oracle/oraInventory/ContentsXML/inventory.xml

bash-3.2$ ls -ltr /var/opt/oracle/oraInventory/ContentsXML/inventory.xml
-rwxrwxrwx   1 appltest oinstall     984 Dec 15 16:17

/var/opt/oracle/oraInventory/ContentsXML/inventory.xml

It was a permission issue. After granting required permissions i was to able to register oracle home with the central inventory successfully.

bash-3.2$ ./runInstaller -silent -attachHome -invPtrLoc /var/opt/oracle/oraInst.loc ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=ORAHOME11Gr23
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 45917 MB    Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /var/opt/oracle/oraInventory
'AttachHome' was successful.

After this i was able to query the lsinventory successfully without any issue.

Thanks!

Monday, December 12, 2016

ERROR : failed to execute adclone.pl


Hello Guys,

I experienced the below error while R12.2 cloning. I have provided the error message from the logs.

SEVERE : Nov 21, 2016 9:39:32 AM - ERROR - CLONE-20275   Insufficient space to create /var/tmp//CLONINGCLIENT1318925579433524449.
SEVERE : Nov 21, 2016 9:39:32 AM - CAUSE - CLONE-20275   Minimum required space was at least "1,892" MB, but only "49" MB was available for use.
SEVERE : Nov 21, 2016 9:39:32 AM - ACTION - CLONE-20275   Make sure that the minimum required space is available for use.
SEVERE : Nov 21, 2016 9:39:32 AM - ERROR - CLONE-20233   Restoring Middleware home for sourceid "mwhome1@FMW_Home" has failed.
SEVERE : Nov 21, 2016 9:39:32 AM - CAUSE - CLONE-20233   An internal operation failed.
SEVERE : Nov 21, 2016 9:39:32 AM - ACTION - CLONE-20233   Check the clone log and error file for more details.
SEVERE : Nov 21, 2016 9:39:32 AM - ERROR - CLONE-20237   Restoring the sourceid "mwhome1@FMW_Home" has failed.
SEVERE : Nov 21, 2016 9:39:32 AM - CAUSE - CLONE-20237   An internal operation failed.
SEVERE : Nov 21, 2016 9:39:32 AM - ACTION - CLONE-20237   Check the clone log and error file for more details.
SEVERE : Nov 21, 2016 9:39:33 AM - ERROR - CLONE-20218   Cloning is not successful.
SEVERE : Nov 21, 2016 9:39:33 AM - CAUSE - CLONE-20218   An internal operation failed.
SEVERE : Nov 21, 2016 9:39:33 AM - ACTION - CLONE-20218   Provide the clone log and error file for investigation.


We can figure out the errors from the log files below to figure out the error.

bash-3.2$ ls -ltr
total 228
-rw-r-----   1 appltest oinstall  102233 Nov 21 09:39 CLONE2016-11-21_09-35-01AM.log
-rw-r-----   1 appltest oinstall    1316 Nov 21 09:39 CLONE2016-11-21_09-35-01AM.error
bash-3.2$ pwd
/d02/DEV/appltest/fs2/inst/apps/DEV_ahqtest/admin/log/clone/fmwT2PApply


Upon investigating into logs i found out that /var is 100% utilised. I cleared few files to fix this issue 

/dev/dsk/c0d0s3         32G    31G    47M   100%    /var

You cannot complete this task because one of the following events caused a loss of page data: A system failure has occurred "Front end is locked after 12.2 upgrade"

  If you have upgraded to Oracle E-Business Suite 12.2.10 Release Update Pack from Oracle E-Business Suite 12.2.6 Release Update Pack (or ea...