cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hostname not resolving using Spark JDBC

Splush_
New Contributor III

Hey guys,

Ive ran into a weird error this morning. Last week I was testing a new Oracle Connector and it ran through smooth the whole last week!

This morning at 7 it ran again and following it was showing a "SQLRecoverableException: IO Error: Unknown host specified" exception on every single run.

The weird thing is, that it is working on other compute - just not the one Im actually using for production. If I do an nslookup, it will resolve the ip just fine and using this exact IP, the jdbc query will work. If I use the hostname straight away inside of the jdbc query, it will not work (although it did last week).

Here is the code I use for fetching the data:

df = spark.read.format("jdbc").option("driver", "oracle.jdbc.driver.OracleDriver") \
            .option("url", jdbc_url) \
            .option("dbtable", query) \
            .option("user", username) \
            .option("password", password) \
            .load()

 

1 ACCEPTED SOLUTION

Accepted Solutions

Splush_
New Contributor III

I have even cloned the cluster and it worked on the new one. But after turning the cluster off over night, it started working again the next morning. This is really weird.

View solution in original post

1 REPLY 1

Splush_
New Contributor III

I have even cloned the cluster and it worked on the new one. But after turning the cluster off over night, it started working again the next morning. This is really weird.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now