RDS Postgresql connection error "SSL SYSCALL error connection reset by peer (0x00002746/10054)"

0

I need to connect to an RDS Posgresql which has SSL enabled and downloaded latest PgAdmin. I followed Using SSL with a PostgreSQL DB instance - Amazon Relational Database Service. I verified the rds.force_ssl=1 is enabled in the parameter group in AWS console. Also verified the access to host/port is open (telnet successful). Even if input all correct : host port password database ( in PGAdmin parameters tab sslRootCert=”ca-central-1.pem” sslmode=”verify-full”). I downloaded the pem file from my zone and point to it in the PGAdamin . tested with sslmode verify-full, verify-ca, require, etc.. Connection fails with “SSL SYSCALL error connection reset by peer (0x00002746/10054) I understand that it fails due to SSL. Can you pls let me know how to fix? Thanks a lot,

SeverH
asked 8 days ago149 views
1 Answer
0

Try regional or global bundles:

Try to use different versions of pgadmin, maybe there is a bug in your specific version

profile picture
EXPERT
answered 7 days ago
profile picture
EXPERT
reviewed 7 days ago
  • For sslmode tried verify-full, verify-ca, require. tested for sslrootecert: ca-central-1-bundle.pem and global-bundle.pem psql "host=HOST port=5432 dbname=testDB user=testUS sslrootcert=ca-central-1-bundle.pem sslmode=verify-ca" Get "server closed the connection unexpectedly SSL SYSCALL error: Connection reset by peer", also SSL error in RDS log. Can telnet to the host/port in Ubuntu WSL/Windows. same error I get from psql (in WSL) or PGAdmin in Windows. In console for RDS, "Connectivity and security" tab the security shows "Publicly accesssible : no", is this the issue even if can telnet?

  • "Publicly accesssible : no" is the best practice. This makes your DB private. try to connect from Linux using "psql" tool. If it works, the issue is with PGAdmin

  • No, it does not work with both pgsql from WSL Ubuntu 22 as well as from PGAdmin on Windows. the error is the same in both ("server closed the connection unexpectedly SSL SYSCALL error: Connection reset by peer"). As mentioned I tried with sslmode verify-full, verify-ca, require. Tested with sslrootecert: ca-central-1-bundle.pem and global-bundle.pem. psql command line is my comment above.

    Thank you very much for input.

  • Does it work without SSL?

  • No, it does not. if i try without SSL it errors with
    "connection to server at ...., port 5432 failed: FATAL: no pg_hba.conf entry for host ...., user ..., database ..., SSL off" which just shows it need SSL (rds.force_ssl=1)