Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS DMS issue with source endpoint in EC2-classic

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.

like image 594
nex.cz Avatar asked Apr 05 '16 19:04

nex.cz


People also ask

What are the permissions required for AWS DMS when using MySQL as the source endpoint?

Using any MySQL-compatible database as a source for AWS DMS The role needs the following privileges: REPLICATION CLIENT – This privilege is required for CDC tasks only. In other words, full-load-only tasks don't require this privilege. REPLICATION SLAVE – This privilege is required for CDC tasks only.

What is endpoint in AWS DMS?

An endpoint provides connection, data store type, and location information about your data store. AWS Database Migration Service uses this information to connect to a data store and migrate data from a source endpoint to a target endpoint.

Does AWS DMS require VPN?

If you don't use a VPN or AWS Direct Connect to connect to AWS resources, you can use the internet to migrate your database. In this case, you can migrate to either an Amazon EC2 instance or an Amazon RDS DB instance.


1 Answers

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

like image 64
Olivier Rivard Avatar answered Sep 18 '22 15:09

Olivier Rivard