Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apache Spark oracle DB JDBC Connection Failure

User_OUTINMar 19 2021 — edited Mar 19 2021

Hello Team,
Could you please advise or suggest me why did the following connection failed. still we couldn't identify where did the issue persists?
df = spark.read \
.format("jdbc") \
.option("url", "jdbc:oracle:thin://HOSTNAME:PORT/SERVICENAME") \
.option("dbtable", "DB.TableName") \
.option("user", "") \
.option("password", "") \
.option("driver", "oracle.jdbc.driver.OracleDriver") \
.load()
we are getting the following error:
Py4JJavaError: An error occurred while calling o268.load.
: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594)
at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:214)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:263)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
... 26 more
Caused by: java.net.SocketTimeoutException: connect timed out
Here we are not listening the default port 1521.it is the different custom port.Could you please help me why did the above error is throwing..it would be helpful.

Thanks

Comments

Post Details

Added on Mar 19 2021
0 comments
1,195 views