AWS DMS issue with source endpoint in EC2-classic

nex.cz picture nex.cz · Apr 5, 2016 · Viewed 13k times · Source

We are using several EC2-Classic servers (Linux Ubuntu) with following configuration: mounted EBS volumes and on them is running Server version: 5.5.48-MariaDB

I would like to use AWS DMS (AWS Database Migration Service) and to migrate our EBS DBs to the RDS AuroraDB in new VPC. I created VPC, AuroraDB (not public accessible), AWS DMS replication instance and endpoints.

From EC2-classic instance I am able to open remote AuroraDB console (thanks to Classic Link), which is in the VPC. Target endpoint (to the AuroraDB) works OK and TEST was finished successful

Source Endpoint show me following error:

Operation:testEndpointDetails:[errType=ERROR_RESPONSE,
status=122502, errMessage=Cannot connect to ODBC provider 122502 ODBC general error.,
errDetails= RetCode: SQL_ERROR SqlState: HY000 NativeError: 2003 Message: unixODBCMySQL http://ODBC 5.3(w)
DriverCan't connect to MySQL server on 'Private.DNS.name' (110) http://122502] ODBC general error.

I tried to set like Server name Private/Public DNS, and Private/Public IP, still same.

Credentials are OK, and I am not using any special characters. I am operate in North Virginia Region. AWS DMS replication instance is set as Public. I am able to log into MariaDB console from remote EC2-classic instance.

I tried set port 3306 and Private/Public IP of AWS DMS replication instance into right Security Groups, but I guess that I still miss something, probably in the SG area, but I am not sure.

Answer

Olivier Rivard picture Olivier Rivard · Apr 7, 2016

I had the same issue with the same error message and it was a network issue. My replication instance didn't have access to the database.

My database is in a VPC with a subnet x and my replication instance is in the same VPC with the same subnet x. I opened the 3306 port in my Network ACL and in the security group of the database to the Internet (0.0.0.0/0) just to test if it was a network problem. The connection test worked with those settings. After the test, I removed the last setting for security.

The solution to my problem was to open the 3306 port in the security group and in the network ACL of the database to all the vpc connection. e.g. 172.0.0.0/16.

Hope it helps