wcc_config results in java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier

book

Article ID: 195534

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - System Agent (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) CA Workload Automation Agent CA Workload Automation AE

Issue/Introduction

wcc_config.bat --dbuser wcc_user --dbpassword wcc_pwd --dbplatform oracle --dbtnspath c:\tnsadmin -u ejmcommander -p ejmcommander -dbtnsname PDB2

Logging in as 'ejmcommander' - SUCCESS

Cannot validate the database using the connection properties below:
TNS name of the database connection: pdb2
Path to the tnsnames.ora file: c:\scripts
Platform: oracle
User: wcc_user
Password: *****
E190664 - Cannot connect to database. Changes will not be applied. See log for full exception.

 

wcc_config.log has 

[ <main> [] ] ERROR 2020-07-21 04:16:23,366  com.ca.wcc.dbresource.datasource.UnlockingDatasource Cannot get database connection
java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier  "PDB2"
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
 at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
 at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
 at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
 at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
 at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
 at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
 at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
 at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
 at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
 at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
 at com.ca.wcc.dbresource.datasource.UnlockingDatasource.getConnection(UnlockingDatasource.java:106)
 at com.ca.wcc.config.command.cli.ConfigurationCommand.validateDB(ConfigurationCommand.java:429)
 at com.ca.wcc.config.command.cli.ConfigurationCommand.doDBChanges(ConfigurationCommand.java:1409)
 at com.ca.wcc.config.command.cli.ConfigurationCommand.main(ConfigurationCommand.java:970)
Caused by: oracle.net.ns.NetException: could not resolve the connect identifier  "pdb2"
 at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:179)
 at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:475)
 at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
 at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
 at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
 ... 16 more
[ <main> [] ] ERROR 2020-07-21 04:16:24,313  root Cannot connect to DB
java.sql.SQLException: Unable to connect to the database. Max number of retries 1 exceeded.
 at com.ca.wcc.dbresource.datasource.UnlockingDatasource.getConnection(UnlockingDatasource.java:100)
 at com.ca.wcc.config.command.cli.ConfigurationCommand.validateDB(ConfigurationCommand.java:429)
 at com.ca.wcc.config.command.cli.ConfigurationCommand.doDBChanges(ConfigurationCommand.java:1409)

 

 

The same gives a proper ORA-xxxxxx error if --dbname,  --dbhost parameters were used.    

 

Cause

Corrupt TNSNames.ora file was causing the above behavior

Environment

Release : 11.3.6

Component : CA Workload Automation AE (AutoSys)

Resolution

Recreate fresh TNSNames.ora, to start with, just one entry against the WCC database to verify the connection works. Then add other entries per necessity.