简体   繁体   English

无法连接到AWS Redshift

[英]Cannot connect to aws redshift

I created a redshift in aws console. 我在AWS控制台中创建了redshift。 the I went to cluster created and based on the information I got in the console I used them in SQL Workbench/J. 我进入了创建的集群,并根据在控制台中获得的信息在SQL Workbench / J中使用了它们。 To set up sql workbench/JI used the following: 要设置sql workbench / JI,请使用以下命令:

https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html 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 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 我还为VPC的入站安全组提供了权限,使我可以进行红移以完全访问我要连接的IP地址,并且存在相同的问题

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.

Did you choose "Publicly accessible" YES (radio button) when creating your cluster? 创建集群时,是否选择了“公众可访问”( YES (单选按钮)? If that is set to NO then you can only access the cluster from inside your VPC. 如果将其设置为“ NO只能从VPC内部访问群集。

You easily change this in the console by navigating to the cluster, clicking the Cluster ˅ button, clicking Modify . 您可以通过在控制台中导航到集群,单击Cluster ˅按钮,然后单击Modify ,轻松地更改此设置。 Then change the "Publicly accessible" selection and click the blue Modify button. 然后更改“公众可访问”选择,然后单击蓝色的“ Modify按钮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM