I have an Ignition 7.5.5 (java 7) - JDBC Driver:postgresql-42.2.20.jre7.jar
Connection with Postgres 9 and Postgres 11 work fine.
I try to connect to Postgres 13 and I have the following error:
Cannot create PoolableConnectionFactory (SSL error: Received fatal alert: protocol_version)
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (SSL error: Received fatal alert: protocol_version)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:194)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:150)
com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1102)
java.lang.Thread.run(Unknown Source)
org.postgresql.util.PSQLException: SSL error: Received fatal alert: protocol_version
org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:43)
org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:534)
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:149)
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)
org.postgresql.Driver.makeConnection(Driver.java:465)
org.postgresql.Driver.connect(Driver.java:264)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:194)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:150)
com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1102)
java.lang.Thread.run(Unknown Source)
javax.net.ssl.SSLException: Received fatal alert: protocol_version
sun.security.ssl.Alerts.getSSLException(Unknown Source)
sun.security.ssl.Alerts.getSSLException(Unknown Source)
sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:41)
org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:534)
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:149)
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)
org.postgresql.Driver.makeConnection(Driver.java:465)
org.postgresql.Driver.connect(Driver.java:264)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:194)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:150)
com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1102)
java.lang.Thread.run(Unknown Source)
I have tested with no success:
Add ssl=false to the connection:
jdbc:postgresql://10.255.1.134:5432/pctc?ssl=false
Add sslmode=disable to the connection:
jdbc:postgresql://10.255.1.134:5432/pctc?sslmode=disable
and ignition.conf:
wrapper.java.additional.10=-Dhttps.protocols=TLSv1.2
https://jdbc.postgresql.org/documentation/head/connect.html#ssl
In PG Admin on the same machine, my conection is Ok with SSL mode disable