Wednesday, December 2, 2009

RC-40201: Unable to connect to Database LT1QSC while running adclonectx.pl

We were trying to generate the xml file in our 11.5.9 environment as part of autoconfig implementation in our environment and we were using adclonectx.pl for this purpose.

The database is a RAC instance and we starting seeing the following issue:
RC-40201: Unable to connect to Database LT1QSC.

The log revealed that database listener was rejecting jdbc connections from adclonectx.pl:
getConnection() -->
sDbHost : psf-db1
sDbDomain : domain.com
sDbPort : 1527
sDbSid : LT1QSC
sDbUser : APPS
Trying to connect using SID...getConnectionUsingSID() --> JDBC URL: jdbc:oracle:thin:@psf-db1.domain.com:1527:LT1QSC
Exception occurred: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093888)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Trying to connect using SID as ServiceNamegetConnectionUsingServiceName() --> JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=psf-db1.domain.com)(PORT=1527))(CONNECT_DATA=(SERVICE_NAME=LT1QSC))) Exception occurred: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093888)(ERR=12514)(ERROR_STACK=(ERROR=(CODE=12514)(EMFI=4))))
Trying to connect using SID as ServiceName.DomainNamegetConnectionUsingServiceName() --> JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=psf-db1.domain.com)(PORT=1527))(CONNECT_DATA=SERVICE_NAME=LT1QSC.domain.com)))
Exception occurred: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=153093888)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=tcp)(HOST=psf-db2.domain.com)(PORT=1527))'))(ERROR=(CO
DE=305)(EMFI=1)))) Connection could not be obtained; returning null

Quick Fix:
shutdown db node 2 and rerun the command, it will go through. This way we are forcing the connection to node 1 itself, as I believe this issue is specific to load balanced environment.

- Aravind Kamath Posral

2 comments:

hsb said...

Aravind,

your post is really helped my issue.

Good stuff keep it up

Pramuditha said...

thanks . it works