Supported authentication types for postgres jdbc driver

I’m setting up a new installation with Ignition 8.1.0 (b2020110211). My connection to PostgreSQL database (v13.1) is faulted and the error message is:

Cannot create PoolableConnectionFactory (The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.)

Ignition and PostgreSQL are installed on the same machine. My pg_hba.conf file includes:

# IPv4 local connections:
host    all             all             127.0.0.1/32            scram-sha-256

Does the pg jdbc driver not support scram-sha-256? What types are supported? Is this documented somewhere?

What version of the PG JDBC driver are you using? Seems you need at least 42.2.0 to use scram-sha-256.

https://wiki.postgresql.org/wiki/List_of_drivers

Where does it show the driver version?

I think you have to look at the JAR file in $IGNITION/user-lib/jdbc.

It looks like new installs of 8.x should have 42.2.5 but if you upgraded from an older version of Ignition you will still have whatever the previous JDBC driver was.

It’s a new installation of 8.1.
In $IGNITION/user-lib/jdbc there is:
postgresql-9.1-901.jdbc4.jar

I also changed the method to md5 and that did not help. And it still shows the same authentication type in the error. I would have expected that to change.

Do you know which connection type corresponds to type 10?

Huh, well that's an ancient version. Get the latest from here and install it: https://jdbc.postgresql.org/download.html

Does restoring a gateway from a backup restore the drivers to earlier versions?

Yes. You must upgrade the JDBC drivers after restoring an old backup.

2 Likes