AWS Glue connect with on premise DB


I am creating sample glue job in aws console using interactive session to connect to on-premise oracle database but getting error. Same code when I am running from Docker is working fine.

tried with two versions of URL



url='mentioned above ' user='xxgmdmadm' password='**********' dbtable='xxgmdmadm.t10''jdbc') .option('url',url) .option('dbtable',dbtable) .option('user',user) .option('password',password).load()

I am getting below error Py4JJavaError: An error occurred while calling o80.load. : java.sql.SQLRecoverableException: IO Error: Unknown host specified at oracle.jdbc.driver.T4CConnection.logon( at oracle.jdbc.driver.PhysicalConnection.<init>( at oracle.jdbc.driver.T4CConnection.<init>( at oracle.jdbc.driver.T4CDriverExtension.getConnection( at oracle.jdbc.driver.OracleDriver.connect( at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$createConnectionFactory$1.apply(JdbcUtils.scala:63) at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$createConnectionFactory$1.apply(JdbcUtils.scala:54) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:56) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation$.getSchema(JDBCRelation.scala:210) at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:35) at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318) at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at py4j.reflection.MethodInvoker.invoke( at py4j.reflection.ReflectionEngine.invoke( at py4j.Gateway.invoke( at py4j.commands.AbstractCommand.invokeMethod( at py4j.commands.CallCommand.execute( at at Caused by: Unknown host specified at at at at at at oracle.jdbc.driver.T4CConnection.connect( at oracle.jdbc.driver.T4CConnection.logon( ... 24 more

asked 2 years ago376 views
1 Answer


Please check the troubleshooting links here. I found the error that you mentioned in the AWS Reference Links.


You may be trying to parametize AWS Glue jobs to apply the same transformation/logic on different datasets in Amazon S3. You want to track processed files on the locations provided. When you run the same job on the same source bucket and write to the same/different destination concurrently (concurrency >1) the job fails with this error:

Solution: set concurrency to 1 or don't run the job concurrently.

Currently AWS Glue bookmarks don't support concurrent job runs and commits will fail.

profile pictureAWS
answered 2 years ago
  • Hello ,

    I am unable to find anything related to connection to database

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions