AWS Glue - JDBC Connection test failed

Viewed 6382

I'm starting with AWS Glue, and want to connect to my on premise mysql server via JDBC.

I follow the documentation, create for glue the IAM Role, policy, security group and connection with correct jdbc connection string. But when I test the connection I receive the following CloudWatch records:

"Check that your connection definition references your JDBC database with 
correct URL syntax, username, and password. Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The 
driver has not received any packets from the server.

Exiting with error code 30"

I'm pretty sure the jdbc connection string is correct.

Something in the Glue config must be missing or wrong.

2 Answers

This error occurs normally in the following scenarios:

  1. When the the VPC in question is used for the VPN configuration.
  2. When the security group is not configured correctly. for instance you have to whitelist these IPs for AWS 52.92.16.0/20 52.216.0.0/15 54.231.0.0/17
  3. When the IAM role for group is not configured correctly.
  4. When you are using glue to connect to an on premise Your case could be among these. Follow this link from [AWS][1] [1]: https://aws.amazon.com/blogs/big-data/how-to-access-and-analyze-on-premises-data-stores-using-aws-glue/

Please check the JDBC url with the port :5439/database name. It should work fine

Related