3
votes

I have just setup my first Redshift cluster and attempting to connect to it via SQL Workbench to be able to create tables.

I have followed the directions for installing and configuring SQL Workbench here: http://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html

I have also downloaded and configured both the 4.0 and 4.1 version of the Redshift JDBC driver and attempted to use both.

When I configure a connection using the JDBC URL provided in the cluster configuration, the SQL Workbench attempts to connect and then I receive the following error:

Amazon(500150) Error setting/closing connection: Connection timed out: connect.

7
Please describe your security group settings.tedder42
Most likely related to the Security Group not permitting access and/or the cluster not being in a Public Subnet of your VPC.John Rotenstein

7 Answers

2
votes
  1. go to to EC2 Console=>Security group , edit the inbound rule add Redshift Select Source MYIP , It will be autofilled by your IP[CIDR]

  2. tried to connect to Redshift using JDBC URL/SQL WORKBENCH Issue is not resolved , Later I disconnected from corporate LAN and used my personal WI FI Network to connect to Internet.

  3. go to to EC2 Console=>Security group , edit the inbound rule add Redshift Select Source MYIP , It will be autofilled by your IP[CIDR] , your CIDR will not be same as in step-1

  4. now my connection with REDSHIFT using JDBC URL/SQL WORKBENCH is working fine.

Looks Issue is because of Proxy setting of corporate LAN.

0
votes

Can you check if there is any proxy that you need to configure(if you are connecting from a secured network). I had the same issue while i was trying to connect to AWS and setting proxy, proper credentials solved the problem.

0
votes

The problem could be because of various reasons.

Generally connection timed out occurs if you instance is unreachable.

If you machine is inside a VPC, please check if it is in a private or public subnet.

Please check your NACL/Security group settings.

Please check if you have selected require_ssl to true in the DB parameter groups which will also cause you error while accessing using the SQL Workbench

0
votes

The issue occurs also because IP ranges that your DB administrator has configured to be serviced by AWS cluster. I had this same issue and it turned out that my IP address was not a participant of the IP ranges set by my DB admin. He added my IP and it worked.

0
votes

One workaround is to replace the hostname in the JDBC URL with the public IP of the cluster, that worked for me!

0
votes

This happens only if you are using other port number apart from 8192. Change the port number to 8192 and it works!

0
votes

You can try the below workaround and it worked.

  1. Ensure you have the right security group with valid port defined

  2. Under "Network and security", set the "Publicly accessible" value "Yes"

  3. Follow the SqlWorkbench/J https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html

  4. To play around with table creation and data handling, follow the steps given in https://docs.aws.amazon.com/redshift/latest/dg/tutorial-loading-data.html