I'm trying to connect my AWS Glue in us-east-2 to my AWS RDS MySQL DB in same region.
I was following this article - https://aws.amazon.com/blogs/big-data/how-to-access-and-analyze-on-premises-data-stores-using-aws-glue/
and getting the following error
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.
I have created the security group for glue in default VPC and have chosen the same VPC while defining the JDBC connection in AWS Glue
jdbc:mysql:/xxxxxxxxxx.us-east-2.rds.amazonaws.com:3306/{DB_NAME}
Some logs
- Driver to be used jar:file:/tmp/mysql-connector-java.jar!/ com.mysql.jdbc.Driver
- Connection url = jdbc:mysql:/xxxxxxxxxx.us-east-2.rds.amazonaws.com:3306/{DB_NAME} SSL certificate =
- DomainName used for host matching =
- Driver properties = com.amazonaws.glue.jobexecutor.commands.jdbc.JdbcDriverProperties@e9cc7a4f
- === Driver com.mysql.jdbc.Driver@4bff1903, Version 8.0 ===
- Starting connecter. driver com.mysql.jdbc.Driver@4bff1903
- Attempting to connect with SSL host matching: jdbc:mysql:/xxxxxxxxxx.us-east-2.rds.amazonaws.com:3306/{DB_NAME}
- Attempting to connect with TLS 1.2 host matching
- TLS1.2 connection failed: 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.
- TLS 1.2 connection to data store using host matching failed. Retrying with legacy properties.
- TLS1.2 connection failed: 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.
- TLS 1.2 connection to data store using host matching legacy properties failed.
- SSL connection to data store using host matching failed. Retrying without host matching. 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.
- Attempting to connect with SSL: jdbc:mysql:/xxxxxxxxxx.us-east-2.rds.amazonaws.com:3306/{DB_NAME}
- Attempting to connect with TLS 1.2
- TLS1.2 connection failed: 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.
Can you troubleshoot if you are able to connect to your RDS using CLI when the SSL is enforced. If that is successful great! https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql-ssl-connections.html#mysql-ssl-connections.require-ssl You can check the ca settings and validation on the RDS console: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html Do you have route to NAT gateway for both subnets where the RDS and the Glue ENI are? if not, can you add that route for testing as of now.