AWS Glue - An error occurred while calling o95.getDynamicFrame. Communications link failure

0

Hi all,

I'm trying to connect to an external MariaDB database instance using a AWS Glue Spark script and a JDBC Glue connection.

The code snippet from the Spark script is:

dyf = glueContext.create_dynamic_frame.from_options( connection_type = 'mysql', connection_options = { "useConnectionProperties": "true", "connectionName": "sample_con_name", "dbtable": "admins", "customJdbcDriverS3Path": "s3://path_to_connector/mysql-connector-java-8.0.17.jar", "customJdbcDriverClassName": "com.mysql.cj.jdbc.Driver" } )

The error that I'm getting after running the Glue Spark job is: An error occurred while calling o95.getDynamicFrame. Communications link failure

The Glue connection is based on a private subnet in my VPC. The private subnet has a route through a NAT gateway in my VPC and an elastic IP is attached to the NAT gateway - this elastic IP is already whitelisted by the external DB's admins.

Just for testing, I made a EC2 instance on the same private subnet, and wrote a small PHP script to connect to the same external database, and it was connecting successfully.

How do I fix this issue? Is it a driver/certificate issue?

Thanks!

2개 답변
0

Having exact same problem, have you found a solution?

HuyBik
답변함 2달 전
0
  • Note that Glue will only use private IP addresses from the subnet you have configured, so you will be required to make sure that these private IPs have access to the data store

So the EC2 instance you used to test the connection, make sure you were able to connect from its private IP address to the external database

  • Additionally, the security group used in the connection should have a self referencing rule to allow connectivity between the Glue workers
답변함 9일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠