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()