我在aws控制台中创建了一个redshift。我去了集群创建,并根据我在控制台中获得的信息,我在SQL Workbench / J中使用它们。 要设置sql workbench / J,我使用了以下内容:
https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html
所以这是我的设置:
现在,当我尝试连接到它时,我得到以下内容:
我知道如何解决它或发生了什么事?
更新
我还给了VPC的入站安全组,我的redshift完全访问了我正在连接的IP地址和同样的问题
这里还有完整的日志:
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.
答案 0 :(得分:1)
您选择&#34;公众可访问&#34;创建群集时YES
(单选按钮)?如果设置为NO
,那么您只能 从您的VPC中访问群集。
您可以在控制台中通过导航到群集轻松更改此设置,点击Cluster ˅
按钮,然后点击Modify
。然后改变&#34;可公开访问&#34;选择并单击蓝色Modify
按钮。