Problems connecting Pentaho Kettle/Spoon to Heroku PostgreSQL using SSL

后端 未结 2 1349
無奈伤痛
無奈伤痛 2020-12-16 05:18

I\'m trying to connect spoon to a Heroku PostgreSQL instance using the JDBC driver that came with Spoon. Heroku requires SSL for it\'s stand alone PostgreSQL instances, whic

相关标签:
2条回答
  • 2020-12-16 06:01

    The basic problem seems to be the SSL handshake. Excerpt from your error messages:

    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: 
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    

    This is not a PostgreSQL specific problem, it's a pure SSL thing. Using these error messages you can find quite some help on this site. Skimming through them this answer looks promising to me and it might guide you into the right direction:

    https://stackoverflow.com/a/6908991/947357

    0 讨论(0)
  • 2020-12-16 06:05

    I found the issue. Simply passing

    ssl = true
    

    isn't enough for JDBC, you also need to install the correct root certificates in your Java keystore so that PgJDBC can verify the remote certificate.

    If you don't want to configure the root certificate store you may instead pass:

    ssl = true
    sslfactory = org.postgresql.ssl.NonValidatingFactory
    

    though doing so disables man-in-the-middle attack protection, so your SSL session no longer has reliable end-to-end security.

    See the Heroku docs here:

    http://devcenter.heroku.com/articles/connecting-to-relational-databases-on-heroku-with-java#connecting_to_a_dedicated_database_remotely

    (Warning about SSL security added by Craig Ringer)

    0 讨论(0)
提交回复
热议问题