Monday, April 28, 2014

Grid Infrastructure Installation failed with error libcap.so.1: cannot open shared object file: No such file or directory

clscfg.bin: error while loading shared libraries: libcap.so.1 : Error while executing the root.sh for Grid Infrastucture in one of the node

Received the following Error while executing the root.sh for Grid Infrastructure Installation in one of the node

OS - RHEL 6.2
DB - 11.2.0.3

[root@coltdb03 ~]# uname -a
Linux coltdb03.cms.colt 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@coltdb03 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
Failed to create keys in the OLR, rc = 127, Message:
  /u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory

Failed to create keys in the OLR at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 7497.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed

Solution

Install the following rpms

[root@coltdb03 ~]# yum install libcap.x86_64
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Package libcap-2.16-5.5.el6.x86_64 already installed and latest version

[root@coltdb03 ~]# yum install compat-libcap1.*

[root@coltdb03 ~]# yum install compat-libcap2.*


[root@coltdb03 ~]# yum install libcap*

# /u01/app/oracle/11.2.0/grid/crs/install/roothas.pl -deconfig
Using configuration parameter file: /u01/app/oracle/11.2.0/grid/crs/install/crsconfig_params

# rm /etc/oracle/olr.loc

[root@coltdb03 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node coltdb01, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

Tuesday, April 22, 2014

How to count Physical CPU in Linux

Many times we will have requirement to know the no of cores and processors information as DBA. Below are the commands used to identify in Cores and processors information in linux server.
1. How to count Physical CPU in Linux
# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2
2. How to count the CPU cores?
# cat /proc/cpuinfo | grep "cpu cores" | uniq
2
 
3. How to count the Virtual Processors?
# cat /proc/cpuinfo | grep "^processor"
processor : 0
processor : 1
processor : 2
processor : 3