WCC upgrade failure ORA-12514
search cancel

WCC upgrade failure ORA-12514

book

Article ID: 231335

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

When attempting to manually upgrade WCC to 12.0, the installer tries to connect to the Oracle database and fails with this message:

Error:
[CAUAJM_E_112508] An error occurred while connecting to the "AUTOTST1" 
database server.
 java.sql.SQLRecoverableException: Listener refused the connection with the 
following error:
ORA-12514, TNS:listener does not currently know of service requested in 
connect descriptor

 

Listener log on db server:

22-DEC-2021 13:37:59 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=AUTOTST1)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.1.1)(PORT=55235)) * establish * AUTOTST1 * 12514
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor

 

 

 

Environment

Release : 12.0

Component :

Cause

Upgrade's JDBC URL is not resolved via TNS. 

 

2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - Obj: dbTnsAlias null dbServiceName=AUTOTST1 dbHostMachine=dbserver.compay.com dbPort=1521
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - TNS_ADMIN=null
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - url template:jdbc:oracle:thin:@//${servername}:${port}/${dbname}
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - Setting host and port: dbserver.compay.com : 1521
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - Database connection string :jdbc:oracle:thin:@//dbserver.compay.com:${port}/AUTOTST1
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - Database connection string :jdbc:oracle:thin:@//dbserver.compay.com:1521/AUTOTST1
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.url.OracleURLBuilder - Database connection string :jdbc:oracle:thin:@//dbserver.compay.com:1521/AUTOTST1
2021-12-22 16:01:16,686 [main] DEBUG com.ca.autosys.db.connection.DBConnectionOracle - tnsAdmin= null
2021-12-22 16:01:16,687 [main] INFO  com.ca.autosys.db.connection.DBConnectionOracle - connecting ... [jdbc:oracle:thin:@//dbserver.compay.com:1521/AUTOTST1]
2021-12-22 16:01:16,687 [main] INFO  com.ca.autosys.db.connection.DBConnectionOracle - Connecting  with user ... [wcc]
2021-12-22 16:01:16,687 [main] INFO  com.ca.autosys.db.connection.DBConnectionOracle - connecting ... [jdbc:oracle:thin:@//dbserver.compay.com:1521/AUTOTST1]
2021-12-22 16:01:16,999 [main] ERROR com.ca.autosys.db.connection.DBConnectionOracle - SQLException: 
2021-12-22 16:01:16,999 [main] ERROR com.ca.autosys.db.connection.DBConnectionOracle - Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
 
2021-12-22 16:01:16,999 [main] DEBUG com.ca.wla.ae.installer.customaction.initialize.AEDBSetUpgradeList - Exception occurred while connecting to database:OracleObject [tnsAlias=null, tnsAdmin=null, oracleWalletJarPath=null, schemaOwner=wcc, cacheLocation=null, principalName=null, jassConfigFile=null]
com.ca.autosys.db.exception.AutosysDBException: java.sql.SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
 
 at com.ca.autosys.db.connection.DBConnectionOracle.openConnection(DBConnectionOracle.java:210)
 at com.ca.autosys.db.connection.DBConnectionOracle.openConnection(DBConnectionOracle.java:184)
 at com.ca.autosys.db.connection.DBConnectionOracle.<init>(DBConnectionOracle.java:122)
 at com.ca.autosys.db.connection.DBFactory.getConnection(DBFactory.java:65)
 at com.ca.autosys.db.main.AutoSysDBConnection.openConnection(AutoSysDBConnection.java:78)
 at com.ca.autosys.db.main.AutoSysDBConnection.<init>(AutoSysDBConnection.java:57)

 

Resolution

Adjust WCC to use TNS_ADMIN  to resolve the Oracle database and then re-run upgrade. This can be done by

1) ensure TNS_ADMIN location has a valid tnsnames.ora that can resolve the WCC database in question

2) Note down the path for TNS_ADMIN and the TNS Alias that needs to be used for WCC database. 

Example:  TNS_ADMIN=/opt/oracle/network/admin        and the TNS entry for WCC database there is AUTOTST1

3)  Update $WCC_INSTALL_LOCATION/data/config/application/config/resources/connection.properties  file with 

wcc.database.tnsname=AUTOTST1

wcc.database.tnspath=/opt/oracle/network/admin

reporting.database.tnsname=AUTOTST1

reporting.database.tnspath=/opt/oracle/network/admin

 

Note: Change the values above to your values, above are just examples

 

4) re-run upgrade again