Immutable solution version
RDS while connection error: no pg_hba.conf entry for host
Complete solution
The 'no pg_hba.conf entry ..
The 'no pghba.conf entry ... no encryption' error on RDS Postgres is an SSL mismatch, not a security group problem. Fix it with rds.forcessl: create a new parameter group for your Postgres version, set rds.force_ssl to 0, attach the parameter group to the instance, and reboot. The client was connecting without SSL while the instance required it, which is why adding IPs to security groups changed nothing.
Context: Stack Overflow #76899023 (accepted answer, 147 votes): I need assistance as I'm having trouble connecting to a managed Postgres database on RDS. I'm encountering the following error message: "no pg_hba.conf entry for host '16.151.149.51', user 'analytics', database 'database', no encryption" I have confirmed that encryption is functioning properly, and I've also added the IP to the security groups. What steps should I take to resolve this issue?
Evidence
Source: Stack Overflow #76899023 (accepted answer, 147 votes): I need assistance as I'm having trouble connecting to a managed Postgres database on RDS. I'm encountering the following error message: "no pg_hba.conf entry for host '16.151.149.51', user 'analytics', database 'database', no encryption" I have confirmed that encryption is functioning properly, and I've also added the IP to the security groups. What steps should I take to resolve this issue?
Verified resolution: The 'no pghba.conf entry ... no encryption' error on RDS Postgres is an SSL mismatch, not a security group problem. Fix it with rds.forcessl: create a new parameter group for your Postgres version, set rds.force_ssl to 0, attach the parameter group to the instance, and reboot. The client was connecting without SSL while the instance required it, which is why adding IPs to security groups changed nothing.
Source URL: https://stackoverflow.com/questions/76899023/rds-while-connection-error-no-pg-hba-conf-entry-for-host
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl__U3RCUrVgP1d4wOuV12tQQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">RDS while connection error: no pg_hba.conf entry for host <span>— Vectle</span></a>