Total Pageviews

Monday, September 26, 2016

script to start weblogic server, OID , OVD servers



#!/bin/sh

export ORACLE_HOME=/home/oracle/app/oracle/product/11gR1ps1/Middleware/Oracle_IDM1

export MW_HOME=/home/oracle/app/oracle/product/11gR1ps1/Middleware
export WL_HOME=/home/oracle/app/oracle/product/11gR1ps1/Middleware/wlserver_10.3
export WLS_HOME=/home/oracle/app/oracle/product/11gR1ps1/Middleware/user_projects
export JAVA_HOME=/usr/java/default
export PATH=$JAVA_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/ldap/bin:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin:$WLS_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export DOMAIN_HOME=$MW_HOME/user_projects/domains/base_domain


cd $DOMAIN_HOME
echo "*********************************"
echo "* Starting the WLS Admin Server *"
echo "*********************************"
date

nohup sh startWebLogic.sh >/dev/null 2>/dev/null &
sleep 1
while [ 1 -gt 0 ]; do
tail -100 AdminServer.log | grep 'Server started in RUNNING mode'
if [ $? -eq 0 ]; then
printf "Admin Server is RUNNING\n"
break
fi
printf "."
sleep 1
done


echo "******************************"
echo "* Starting OID / OVD Servers *"
echo "******************************"
date

cd $ORACLE_HOME/opmn/bin
./opmnctl startall
sleep 1
./opmnctl status


cd $DOMAIN_HOME/bin
echo "****************************************"
echo "* Starting the wls_ods1 Managed Server *"
echo "****************************************"
date
nohup sh startManagedWebLogic.sh wls_ods1 "http://localhost:7001" >/dev/null 2>/dev/null &

Wednesday, September 21, 2016

OIF error Could not create pool connection. The DBMS driver exception was: IO Error: The Network Adapter could not establish the connection



 [ERROR] [FED-12064] [oracle.security.fed.model.util.rdbms.RDBMSConnectionManager] [tid: Thread-541] [userId: <anonymous>] [ecid: 0000Oe8_AWh8hoWzLwjO8A0000Hr000RcS,1:
20018] [APP: OIF#11.1.1.2.0] [URI: /fed/idp/initiatesso] Exception: {0}[[
weblogic.jdbc.extensions.ConnectionDeadSQLException: weblogic.common.resourcepool.ResourceDeadException: 0:weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: IO
 Error: The Network Adapter could not establish the connection
        at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:250)
        at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java:456)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:538)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:498)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:491)
        at oracle.security.fed.model.util.rdbms.RDBMSConnectionManager.getConnection(RDBMSConnectionManager.java:210)
        at oracle.security.fed.jvt.discovery.model.artifact.RDBMSArtifactDiscoveryProvider.run(RDBMSArtifactDiscoveryProvider.java:256)
        at java.lang.Thread.run(Thread.java:722)

 [ERROR] [FED-12064] [oracle.security.fed.jvt.discovery.model.artifact.RDBMSArtifactDiscoveryProvider] [tid: Thread-541] [userId: <anonymous>] [ecid: 0000Oe8_AWh8hoWzL
wjO8A0000Hr000RcS,1:20018] [APP: OIF#11.1.1.2.0] [URI: /fed/idp/initiatesso] Exception: javax.naming.NamingException: Could not get an RDBMS Connection
[2016-09-09T22:10:24.362-05:00] [wls_oif1] [ERROR] [FED-11013] [oracle.security.fed.jvt.discovery.model.artifact.RDBMSArtifactDiscoveryProvider] [tid: Thread-541] [userId: <anonymous>] [ecid: 0000Oe8_AWh8hoWzL
wjO8A0000Hr000RcS,1:20018] [APP: OIF#11.1.1.2.0] [URI: /fed/idp/initiatesso] SQL error while interacting with the database.[[
java.sql.SQLException: Connection has already been closed.
        at weblogic.jdbc.wrapper.PoolConnection.checkConnection(PoolConnection.java:62)
        at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:100)
        at weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection.rollback(Unknown Source)
        at oracle.security.fed.jvt.discovery.model.artifact.RDBMSArtifactDiscoveryProvider.run(RDBMSArtifactDiscoveryProvider.java:334)
        at java.lang.Thread.run(Thread.java:722)



Solution:

check OIF database setting. click on Edit and test connection for each data store setting.  it can be 2 reasons

1. database users password is expired
2. database is down.

find file bigger than 1G


find  / -size +1G


changing ODS password in OID


[oracle@oracle bin]$ opmnctl startall
opmnctl startall: starting opmn and all managed processes...
================================================================================
opmn id=orasystemsusa.com:6701
    0 of 1 processes started.
ias-instance id=asinst_1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------
ias-component/process-type/process-set:
    oid1/oidmon/OID/
Error
--> Process (index=1,uid=90987534,pid=25146)
    time out while waiting for a managed process to start
    Log:
    /u01/Middleware/asinst_1/diagnostics/logs/OID/oid1/console~OID~1.lo




at oidmon-0000.log below error


OID] [NOTIFICATION:16] [] [OIDMON] [host: orasystemsusa.com] [pid: 5941] [tid: 0] Guardian: Connecting to database, connect string is oiddb

 [OID] [NOTIFICATION:16] [] [OIDMON] [host: orasystemsusa.com] [pid: 5941] [tid: 0] Guardian: [gsdsiConnect] ORA-28002, ORA-28002: the password will expire within 7 days


 [OID] [NOTIFICATION:16] [] [OIDMON] [host: orasystemsusa.com] [pid: 5941] [tid: 0] Guardian: [oidmon]: Unable to connect to database, will retry again after 10 sec


at database it shows
SQL> select account_status,profile from dba_users where username='ODS';

ACCOUNT_STATUS                   PROFILE
-------------------------------- ------------------------------
EXPIRED(GRACE)                   DEFAULT


and when connecting you will get below error

SQL> connect ods/password1
ERROR:
ORA-28002: the password will expire within 4 days


Connected.

Issue:
when ODS schema user shows that password is EXPIRED, it will not start opmnctl services


Solution:

update ODS password by following below steps


lways set the env variables correctly prior to using any command line tools:

export ORACLE_HOME=

export ORACLE_SID=
export

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/ldap/bin:$PATH

(path must always have OID home dir's first in the list)


Go to the $ORACLE_HOME/ldap/admin directory.

Rename the oidpwdlldap1 and oidpwddrxxxx files, where xxxx is the instance name.

Login to the OID database via sql*plus as the user system.

Reset the ODS schema password:

SQL> alter user ods identified by <password>

Issue the oidpasswd create_wallet = truecommand to recreate the files you renamed in step 2.

oidpasswd connect=<connect string> create_wallet = true

Then run oidpasswdto reset the password to the same as you set with the Alter command via sql*plus in step 4, as follows:

% oidpasswd connect=<connect string> change_oiddb_pwd=true



Thursday, September 15, 2016

checking database connection pool configuration from weblogic console

to check database connection pool do the following

login to weblogic


click on services  --> data sources

from configuration click on the database connection you want to check

click on Connection Pool

Wednesday, September 7, 2016

100% Solution to install JDK 1.7_79 at Solaris 64 bit.

I have wasted a lot of time after installing JDK 1.7_79 64bit version because my solaris was 64bit. After installing only 64bit, when i started Weblogic i was getting below error.

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Objectv


After searching error i have found that JDK 1.7 require both 32bit and 64bit version because it uses some libraries from 32bit.




below are the steps i followed to resolve above error.

Solaris JDK manual installation


JAVA -Manually Installing JRE/JDK on Solaris

As we all know, there are many ways of installing and configuring packages and patches on Solaris. Here are some methods to install the Java Development Runtime Environment (JRE) and the Java Development Kit (JDK) on Solaris. Java has multiple web sites dedicated to supporting the java effort. This article will only use two of these site for installation methods.

Download the JDK from the Oracle website

If you browser is setup to allow the site to determine your systems information it will automatically take you the recommended download links. As in my case for Solaris x86:

Java Downloads for Solaris - Recommended Version 7 Update 79

Download both of the files (32/64bit) to a temporary work directory and un-compress and untar them.

# cd /tmp

# gunzip -dc jdk-7u79-solaris-i586.tar.gz

# gunzip -dc jdk-7u79-solaris-x64.tar.gz

This recreates a jdk1.7.0_79 directory containing the updates for the JDK software.

Check the current directory listings.

# ls /usr/jdk/instances

 jdk1.6.0

Move the updated jre to a directory consistent with the other JRE packages.

mv jdk1.7.0_79 /usr/jdk/instances/jdk1.7.79

Again check the current directory listings.

# cd /usr/jdk

# ls -l

total 9

drwxr-xr-x 5 root bin 5 Sep 16 16:08 instances

lrwxrwxrwx 1 root root 18 Jul 14 11:11 jdk1.6.0_26 -> instances/jdk1.6.0

lrwxrwxrwx 1 root root 18 Sep 14 16:09 latest -> jdk1.6.0


Remove the latest link to the older jdk directory.

# rm latest

Create current links to the newer jdk.

# ln -s instances/jdk1.7.79 jdk1.7.0_79

# ln -s jdk1.7.0_79 latest


optional:
Remove the old link to the java application and relink it to the new release.

# rm java

# ln -s jdk/latest java




Check your work

# java -version

java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b10)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)

doing above solved my issue.

======================================================

below are the steps for firfox upgrade

The browser should most likely be kept consistent with the JRE.

stop firefox

# cd /usr/lib/firefox/plugins

# rm libnpjp2.so

# ln -s /usr/jdk/jdk1.7.0_79/jre/lib/i386/libnpjp2.so libnpjp2.so

start firefox

Using oracle.com/technetwork/java

Download the JDK(s) from the Oracle Java web site. The JDK contains the JRE and will be installed when installation is complete. http://www.oracle.com/technetwork/java/index.html

Under the Technologies listing, click on the "Java SE” link.

Followed by clicking on the “Downloads” tab above the “Java SE at a Glance” heading.

Again, Followed by clicking on the “Java Platofrm (JDK) 7u7” icon.

From the “Java SE Development Kit 7 Downloads” page you must “Accept License Agreement” button to continue with the download. As in my case again I will donwload the Solaris x86/Solaris x64 releases.

Solaris x86 - 91.86 MB - jdk-7u79-solaris-i586.tar.gz

Solaris x64 - 14.95 MB – jdk-7u79-solaris-x64.tar.gz

Download both of the files (32/64bit) to a temporary work directory and un-compress and untar them.

# cd /tmp

# gzcat -dc jdk-7u79-solaris-i586.tar.gz | tar xf -

# gzcat -dc jdk-7u79-solaris-x64.tar.gz | tar xf -

This recreates a jdk1.7.0_79 directory containing the updates for the JDK software.

Check the current directory listings.

# ls /usr/jdk/instances

jdk1.5.0 jdk1.6.0

Move the updated jre to a directory consistent with the other JRE packages.

mv jdk1.7.0_07 /usr/jdk/instances/jdk1.7.79

Again check the current directory listings.

# cd /usr/jdk

# ls -l

total 9

drwxr-xr-x 5 root bin 5 Sep 4 16:08 instances

lrwxrwxrwx 1 root root 18 Jul 14 11:11 jdk1.6.0_26 -> instances/jdk1.6.0

lrwxrwxrwx 1 root root 8 Sep 4 16:09 latest -> jdk1.6.0

drwxr-xr-x 4 root bin 4 Jul 14 11:04 packages

Remove the latest link to the older jdk directory.

# rm latest

Create current links to the newer jdk.

# ln -s instances/jdk1.7.0 jdk1.7.0_79

# ln -s jdk1.7.0_79 latest

Yet, Again check you directory listing.

# cd /usr/

l# s -ld java

lrwxrwxrwx 1 root root 12 Sep 4 16:12 java -> jdk/jdk1.6.0

Remove the old link to the java application and relink it to the new release.

# rm java

# ln -s jdk/latest java

Check your work

# java -version

java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b10)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)

# /usr/java/bin/amd64/javac -version

        javac 1.7.0_79

The browser should most likely be kept consistent with the JRE.

stop firefox

# cd /usr/lib/firefox/plugins

# rm libnpjp2.so

# ln -s /usr/jdk/jdk1.7.0_79/jre/lib/i386/libnpjp2.so libnpjp2.so

start firefox