Skip to content

DMS Serverless - Internal server error

0

endpoint_type="source", engine_name="postgres", username=secret_lookup_ref(stack.db_secret_arn, "username"), password=secret_lookup_ref(stack.db_secret_arn, "password"), server_name=secret_lookup_ref(stack.db_secret_arn, "host"), port=PORT, database_name=secret_lookup_ref(stack.db_secret_arn, "dbname"), ssl_mode="none",

db parameter has rds.force_ssl = 1

got below error while creating task

Test connection failed for endpoint 'src' and replication config 'taskname'. Failure Message: 'Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to connect Network error has occurred, Application-Detailed-Message: RetCode: SQL_ERROR SqlState: 08001 NativeError: 101 Message: FATAL: no pg_hba.conf entry for host "10.0.14.155", user "user", database "db", no encryption Additional info: Code: [DMS-00100], Message: [no pg_hba.conf entry for host "10.0.14.155", user "user", database "db", no encryption], NativeErrorCode: [28000]'

1 Answer
0

The error you're encountering with AWS DMS Serverless is related to a mismatch between your SSL configuration settings. Your RDS PostgreSQL database has rds.force_ssl = 1 which means it requires SSL connections, but in your DMS endpoint configuration, you've set ssl_mode="none".

This is causing the error message: "no pg_hba.conf entry for host, user, database, no encryption" because the PostgreSQL database is rejecting non-encrypted connections.

To resolve this issue, you need to update your DMS endpoint configuration to use SSL. Change the ssl_mode parameter from "none" to "verify-ca" or "verify-full". You'll also need to ensure that your DMS Serverless replication has access to the appropriate CA certificates.

Additionally, since you're using DMS Serverless, it's important to note that unlike standard replication instances, DMS Serverless replications do not have a public IP address for management tasks. If your database is in a private network, you'll need to ensure proper network connectivity through a VPC endpoint.

Make sure that:

  1. Your DMS endpoint has SSL enabled (change ssl_mode from "none" to an appropriate SSL mode)
  2. Your subnet configuration for the DMS Serverless replication allows proper connectivity to your PostgreSQL database
  3. Any security groups and network ACLs allow traffic between DMS Serverless and your database
    Sources
    How to Solve This Error in AWS DMS Serverless? | AWS re:Post
    Issues with SSL Communication to Amazon RDS SQL Server | AWS re:Post

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.