问题
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.
回答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]
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.
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
now my connection with REDSHIFT using JDBC URL/SQL WORKBENCH is working fine.
Looks Issue is because of Proxy setting of corporate LAN.
回答2:
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.
回答3:
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
回答4:
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.
回答5:
One workaround is to replace the hostname in the JDBC URL with the public IP of the cluster, that worked for me!
回答6:
This happens only if you are using other port number apart from 8192. Change the port number to 8192 and it works!
来源:https://stackoverflow.com/questions/33788418/amazon-aws-connection-error