Connecting Metabase MacOS app to RDS PostgreSQL DB Instance - SSL error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Hello,

I started a DB Instance on RDS and wanted to connect my MacOS Metabase app to it to run analytics. However, the following error occurs:

SSL error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

What should I do?

Hi @xxx
I would recommend not using the Mac App. We are deprecating it.
Try the JAR or Docker instead: https://www.metabase.com/learn/getting-started/installing

The Mac App has been great for testing functionalities. Is the error because of the app then? If I connect the DB to Metabase Cloud it won't occur?

@xxx We're removing the Mac App for many reasons, this is one of them. Yes, please try Metabase Cloud - it should work without any problems.

I did as you suggested, the problem still occurs in Metabase Cloud.

SSL error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

@xxx Okay, there's hundreds if not thousands of installations of Metabase using RDS as their data source, so I'm not sure why it's failing for you, but I guess it might have something to do with your RDS configuration.
Try DBeaver.io, since it uses similar drivers as Metabase. Perhaps you can figure out what configuration you'll need to connect.

I started the simplest DB instance on RDS to test speed/connection/etc. Took all the settings as default and followed your documentation guidelines. Don't you have dedicated support for database connection issues? I'm kinda feeling left on my own here...

@xxx There's more than 30,000 installations of the free open source edition of Metabase. This forum provides support for those.

Are you using a custom certificate? If yes, then that is currently not supported, but is something that is being worked on (hopefully v42 will have that). For reference: https://github.com/metabase/metabase/issues/18036

But post "Diagnostic Info" from Admin > Troubleshooting.
And the full stacktrace from Admin > Troubleshooting > Logs.

Just to tie a knot on this. It was caused by selecting "Amazon Redshift" as connection driver in Metabase, when it should have been set to "PostgreSQL", since the connection was to AWS RDS Postgres.