我在 aws 控制台中创建了一个红移。我去创建集群,并根据我在控制台中获得的信息在 SQL Workbench/J 中使用它们。要设置 sql workbench/JI,请使用以下内容:
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.