Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ranger dba_script.py - how to specify oracle listener port?

avatar
Contributor

While running Ranger dba_script.py - with DB Host value as database server name failing to connect.

[root@prd002 ranger-admin]# export JAVA_HOME=/usr/java/default [root@prd002 ranger-admin]# export JRE_HOME=$JAVA_HOME/jre [root@prd002 ranger-admin]# export PATH=$JAVA_HOME/bin:$PATH [root@prd002 ranger-admin]# python dba_script.py -q -d RangerDBerr.sql 2015-11-18 16:50:13,595 [I] File RangerDBerr.sql is available. 2015-11-18 16:50:13,595 [I] Running DBA setup script. QuiteMode:True 2015-11-18 16:50:13,595 [I] Using Java:/usr/java/default/bin/java 2015-11-18 16:50:13,595 [I] DB FLAVOR:ORACLE 2015-11-18 16:50:13,595 [I] DB Host:dbserver.com 2015-11-18 16:50:13,596 [I] Dry run mode:True 2015-11-18 16:50:13,596 [I] Logging DBA Script in file:RangerDBerr.sql 2015-11-18 16:50:13,596 [I] Checking connection SQLException : SQL state: 08006 java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection ErrorCode: 17002 2015-11-18 16:50:13,880 [E] Can't establish connection,Change configuration or Contact Administrator!!

1 ACCEPTED SOLUTION

avatar
Master Mentor

@skonduru

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection ErrorCode: 17002 2015-11-18 16:50:13,880 [E] Can't establish connection,Change configuration or Contact Administrator!!

The above is realted to incorrect setting of oracle string.

Please try this db_host=//Oracle_DB_SERVER:DB_PORT/SID

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@skonduru

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection ErrorCode: 17002 2015-11-18 16:50:13,880 [E] Can't establish connection,Change configuration or Contact Administrator!!

The above is realted to incorrect setting of oracle string.

Please try this db_host=//Oracle_DB_SERVER:DB_PORT/SID

avatar
Contributor

thank you Neeraj suggested change worked.