Thread: Disable JDBC driver SSL connection attempt with GeoNetwork/PostgreSQL-PostGIS DB
Disable JDBC driver SSL connection attempt with GeoNetwork/PostgreSQL-PostGIS DB
From
celati Laurent
Date:
Hello,
i work with postgresql 13 and java 8
Following to my previous post : https://gis.stackexchange.com/questions/445280/geonetwork-4-2-1-debian-install-error-message
The problem seems to come from the JDBC driver wants to connect over SSL. How to disable SSL connection attempt? I would prefer to try disable SSL connection attempt via GeoNetwork config files rather than to enable/set a SSL configuration (like set a certificate for instance) on the PostgreSQL/PostGIS db.
For information, I succeed in connecting to my PostGIS db via psql console. Below the geonetwork jdbc.properties at jdbc.connectionProperties is on ssl=false
jdbc.connectionProperties=ssl=false
jdbc.basic.removeAbandoned=true
jdbc.basic.removeAbandonedTimeout=300
jdbc.basic.logAbandoned=true
jdbc.basic.maxActive=30
jdbc.basic.maxIdle=10
jdbc.basic.initialSize=10
jdbc.basic.maxWait=500
jdbc.basic.testOnBorrow=true
jdbc.basic.timeBetweenEvictionRunsMillis=1000
jdbc.basic.minEvictableIdleTimeMillis=1800000
jdbc.basic.testWhileIdle=true
jdbc.basic.numTestsPerEvictionRun=5
jdbc.basic.poolPreparedStatements=true
jdbc.basic.maxOpenPreparedStatements=1200
jdbc.basic.validationQuery=SELECT 1
jdbc.basic.defaultReadOnly=false
jdbc.basic.defaultAutoCommit=false
i work with postgresql 13 and java 8
Following to my previous post : https://gis.stackexchange.com/questions/445280/geonetwork-4-2-1-debian-install-error-message
The problem seems to come from the JDBC driver wants to connect over SSL. How to disable SSL connection attempt? I would prefer to try disable SSL connection attempt via GeoNetwork config files rather than to enable/set a SSL configuration (like set a certificate for instance) on the PostgreSQL/PostGIS db.
For information, I succeed in connecting to my PostGIS db via psql console. Below the geonetwork jdbc.properties at jdbc.connectionProperties is on ssl=false
jdbc.connectionProperties=ssl=false
jdbc.basic.removeAbandoned=true
jdbc.basic.removeAbandonedTimeout=300
jdbc.basic.logAbandoned=true
jdbc.basic.maxActive=30
jdbc.basic.maxIdle=10
jdbc.basic.initialSize=10
jdbc.basic.maxWait=500
jdbc.basic.testOnBorrow=true
jdbc.basic.timeBetweenEvictionRunsMillis=1000
jdbc.basic.minEvictableIdleTimeMillis=1800000
jdbc.basic.testWhileIdle=true
jdbc.basic.numTestsPerEvictionRun=5
jdbc.basic.poolPreparedStatements=true
jdbc.basic.maxOpenPreparedStatements=1200
jdbc.basic.validationQuery=SELECT 1
jdbc.basic.defaultReadOnly=false
jdbc.basic.defaultAutoCommit=false
But i have still the same error messages regarding ssl when i try to start geonetwork.
This morning, i saw this post :
So i tried to test with sslmode=disable
But it does not work for me. Still the same logs/errors messages.
Any guidances ? Thanks a lot.
Re: Disable JDBC driver SSL connection attempt with GeoNetwork/PostgreSQL-PostGIS DB
From
Mark Rotteveel
Date:
On 08-12-2022 13:47, celati Laurent wrote: > i work with postgresql 13 and java 8 > > Following to my previous post : > https://gis.stackexchange.com/questions/445280/geonetwork-4-2-1-debian-install-error-message <https://gis.stackexchange.com/questions/445280/geonetwork-4-2-1-debian-install-error-message> > > The problem seems to come from the JDBC driver wants to connect over > SSL. How to disable SSL connection attempt? I would prefer to try > disable SSL connection attempt via GeoNetwork config files rather than > to enable/set a SSL configuration (like set a certificate for instance) > on the PostgreSQL/PostGIS db. > > For information, I succeed in connecting to my PostGIS db via psql > console. Below the geonetwork jdbc.properties at > jdbc.connectionProperties is on ssl=false > > > jdbc.connectionProperties=ssl=false Are you sure this is the proper way to specify additional configuration properties? Maybe it is `jdbc.connectionProperties.ssl=false`? To be clear, I don't know this tool. but I'm just guessing based on patterns in other tools. That said, the documentation of the `ssl` configuration properties says that the mere presence of that property enables SSL, irrespective of the value (see ssl at https://jdbc.postgresql.org/documentation/use/#connection-parameters). > But i have still the same error messages regarding ssl when i try to > start geonetwork. > This morning, i saw this post : > https://forum.inductiveautomation.com/t/ignition-7-5-5-how-to-disable-ssl-for-connection-to-posgres-13/47275 <https://forum.inductiveautomation.com/t/ignition-7-5-5-how-to-disable-ssl-for-connection-to-posgres-13/47275> > > So i tried to test with sslmode=disable > > But it does not work for me. Still the same logs/errors messages. Have you tried adding the configuration option to the JDBC URL (as suggested by that link), instead of using that jdbc.connectionProperties thing? -- Mark Rotteveel
Re: Disable JDBC driver SSL connection attempt with GeoNetwork/PostgreSQL-PostGIS DB
From
Dave Cramer
Date:
On Fri, 9 Dec 2022 at 07:20, Mark Rotteveel <mark@lawinegevaar.nl> wrote:
On 08-12-2022 13:47, celati Laurent wrote:
> i work with postgresql 13 and java 8
>
> Following to my previous post :
> https://gis.stackexchange.com/questions/445280/geonetwork-4-2-1-debian-install-error-message <https://gis.stackexchange.com/questions/445280/geonetwork-4-2-1-debian-install-error-message>
>
> The problem seems to come from the JDBC driver wants to connect over
> SSL. How to disable SSL connection attempt? I would prefer to try
> disable SSL connection attempt via GeoNetwork config files rather than
> to enable/set a SSL configuration (like set a certificate for instance)
> on the PostgreSQL/PostGIS db.
by default jdbc does not connect with ssl so I'm curious why it would be trying to?
Dave
>
> For information, I succeed in connecting to my PostGIS db via psql
> console. Below the geonetwork jdbc.properties at
> jdbc.connectionProperties is on ssl=false
>
>
> jdbc.connectionProperties=ssl=false
Are you sure this is the proper way to specify additional configuration
properties? Maybe it is `jdbc.connectionProperties.ssl=false`? To be
clear, I don't know this tool. but I'm just guessing based on patterns
in other tools.
That said, the documentation of the `ssl` configuration properties says
that the mere presence of that property enables SSL, irrespective of the
value (see ssl at
https://jdbc.postgresql.org/documentation/use/#connection-parameters).
> But i have still the same error messages regarding ssl when i try to
> start geonetwork.
> This morning, i saw this post :
> https://forum.inductiveautomation.com/t/ignition-7-5-5-how-to-disable-ssl-for-connection-to-posgres-13/47275 <https://forum.inductiveautomation.com/t/ignition-7-5-5-how-to-disable-ssl-for-connection-to-posgres-13/47275>
>
> So i tried to test with sslmode=disable
>
> But it does not work for me. Still the same logs/errors messages.
Have you tried adding the configuration option to the JDBC URL (as
suggested by that link), instead of using that jdbc.connectionProperties
thing?
--
Mark Rotteveel