Passer au contenu

RDS Postgres Replica password authentication failed for rdsrepladmin

0

My replica is stuck in an ERROR state because it can't connect to the source database using the rdsrepladmin role—the system continuously reports an authentication failure.

This problem began after upgrading my RDS PostgreSQL instance from version 12 to 16. PostgreSQL 12 used md5 for password encryption, while version 16 uses scram.

The source database logs display this error:

Connection matched file "/rdsdbdata/config/pg_hba.conf" line 22: "host replication rdsrepladmin 10.1.3.47/32 scram-sha-256"
:FATAL: password authentication failed for user "rdsrepladmin"
:rdsrepladmin@[unknown]:[16634]:DETAIL: User "rdsrepladmin" does not have a valid SCRAM secret.

I attempted to reset rdsrepladmin's password scram, but it seems like the role is protected and managed solely by AWS. I also tried modifying the some of the parameter groups option (password encryption) for both the source and replica databases to use md5 instead of scram, but that didn't resolve the issue.

It seems like authentication configuration is managed within the pg_hba.conf file, to which AWS doesn't provide access. I thought about changing the confirm inside that file to force decryption via md5, but that's a silly work around and doesn't solve the root cause of the issue.

Is there something that I'm missing here? What are my options?

demandé il y a 2 ans557 vues

1 réponse
0

You can try to reset the password by running the query on the primary database.

ALTER USER rdsrepladmin WITH PASSWORD 'new_secure_password';

Then, restart the replica database instance. See if this works.

aws rds reboot-db-instance --db-instance-identifier current-replica-instance

If this does not work, you can try building a new replica and deleting the current one.

EXPERT

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.