Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon 500150 Error setting closing connection General SSLEngine

While connecting to Amazon RedShift, I getting the below error:

2016-04-14 13:49:30 ERROR SQL Exception when connecting [Amazon](500150) Error setting/closing connection: General SSLEngine problem.
java.sql.SQLException: [Amazon](500150) Error setting/closing connection: General SSLEngine problem.
    at workbench.db.DbDriver.connect(DbDriver.java:546)
    at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:244)
    at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:172)
    at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:227)
    at workbench.gui.components.ConnectionSelector$1.run(ConnectionSelector.java:131)
Caused by: java.sql.SQLException: [Amazon](500150) Error setting/closing connection: General SSLEngine problem.
    at com.amazon.redshift.client.PGClient.<init>(Unknown Source)
    at com.amazon.redshift.core.PGJDBCConnection.connect(Unknown Source)
    at com.amazon.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
    at com.amazon.jdbc.common.AbstractDriver.connect(Unknown Source)
    at workbench.db.DbDriver.connect(DbDriver.java:513)
    at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:244)
    at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:172)
    at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:227)

I am using SQL Workbench J to connect to the database system. The strangeness here it that the connection was working fine two days ago. This problem appeared from nowhere. Any idea??

We are following the exact steps written in the setup guide to add certificates to Java.

https://community.boomi.com/docs/DOC-2381

Am I missing anything here?

UPDATE

My Redshift database is SSL configured. We use SQL Workbench J (http://www.sql-workbench.net/) client to connect to that database. The issue now is that everytime we try to connect, we are getting the error I mentioned.

Below is our URL format:

jdbc:redshift://hostname:5439/dbname?ssl=true&sslmode=verify-full
like image 653
Sudhendu Avatar asked Apr 14 '16 08:04

Sudhendu


2 Answers

It worked for me when I followed the solution given by cfregly on databricks forum. Please follow below URL for this solution:

https://forums.databricks.com/questions/867/ssl-connection-issues-with-redshift.html

Please try appending sslfactory value in the Connection URL string like below - it might work.

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

like image 58
Randhir Kumar Avatar answered Nov 10 '22 20:11

Randhir Kumar


Please add the following without the server certificate

ssl=true&sslfactory=com.amazon.redshift.ssl.NonValidatingFactory

The following would be the possible values for sslfactory

com.amazon.redshift.ssl.NonValidatingFactory
org.postgresql.ssl.NonValidatingFactory

Please see http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-options.html

like image 4
Kunal Avatar answered Nov 10 '22 19:11

Kunal