I'm noticing a strange issue connecting to the AWS serverless Aurora endpoint. In our environment, there is an ECS task that creates a DB schema and DB users successfully then there is an application that tries to connect to that same DB and fails.
For some reason, the application that tries to connect to the DB uses an IP address that is not in any CIDR block in the VPC.
VPC's IP CIDR block is 10.100.0.0/16. Serverless RDS cluster uses the subnet present in the VPC (IP range is 10.100.x.x), ECS task and application also uses the same subnet.
java.sql.SQLNonTransientConnectionException: Could not connect to HostAddress{host='dev-db-cluster-serverlessdbcluster-abcd-us-west-2.rds.amazonaws.com', port=3306}. (conn=86949)
Access denied for user 'testservice'@'10.1.6.133'
I'm not able to figure out why an application that uses the same DB host translates the wrong IP 10.1.6.133
and where is this IP coming from.
question from:
https://stackoverflow.com/questions/65914633/aws-rds-connectivity-issue 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…