Reputation: 2560
I created a redshift in aws console. the I went to cluster created and based on the information I got in the console I used them in SQL Workbench/J. To set up sql workbench/J I used the following:
https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html
So here is my setup:
Now when I try to connect to it I get the following:
Any idea how I can fix it or what is going on?
UPDATE
I also gave inbound security group of the VPC which I had my redshift in full access to the IP address I am conncting and the same issue
Also here is the full logs:
2018-01-18 16:39:36 ERROR Error connecting to the database using
URL=jdbc:redshift://hamedtest.cb1dy4xxxxxxxxxxx [Amazon](500150) Error
setting/closing connection: Connection timed out: connect. [SQL
State=HY000, DB Errorcode=500150]
java.sql.SQLException: [Amazon](500150) Error setting/closing
connection: Connection timed out: connect.
at com.amazon.redshift.client.PGClient.connect(Unknown Source)
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 com.amazon.redshift.jdbc.Driver.connect(Unknown Source)
at workbench.db.DbDriver.connect(DbDriver.java:513)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:255)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:182)
at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:22
7)
Caused by: com.amazon.support.exceptions.GeneralException: [Amazon](500150)
Error setting/closing connection: Connection timed out: connect.
Upvotes: 0
Views: 3973
Reputation: 14035
Did you choose "Publicly accessible" YES
(radio button) when creating your cluster? If that is set to NO
then you can only access the cluster from inside your VPC.
You easily change this in the console by navigating to the cluster, clicking the Cluster ˅
button, clicking Modify
. Then change the "Publicly accessible" selection and click the blue Modify
button.
Upvotes: 4