Amazon 500150:无法连接到Redshift Cluster [英] Amazon 500150 : Unable to connect to Redshift Cluster
问题描述
我遵循了此处
通过Workbench J
连接到Redshift
.
I followed all the steps mentioned on here
to connect to Redshift
through Workbench J
.
我没有使用SSH
进行连接,因此请单独保留SSH
设置.
I am not using SSH
to connect, so have left SSH
settings alone.
在选择Redshift
后选择安全性"时,我看到:
When I select Security after selecting Redshift
, I see :
您的帐户在该区域不支持EC2-Classic平台.仅当支持EC2-Classic平台时,群集安全组才可用.而是使用VPC安全组来控制对群集的访问.转到EC2控制台以查看您的VPC安全组.有关更多信息,请参阅受支持平台上的Amazon Redshift文档和VPC中的管理集群.
Your account does not support the EC2-Classic Platform in this region. Cluster Security Groups are only available when the EC2-Classic Platform is supported. Instead, use VPC Security Groups to control access to your clusters. Go to the EC2 Console to view your VPC Security Groups. For more information, see Amazon Redshift Documentation on Supported Platforms and Managing Clusters in VPC.
我的群集位于具有以下入站规则的安全组下:
My cluster is under a Security Group which has the following Inbound rule :
Type: Redshift
Protocol: TCP
Port Range: 5439
Source: Custom 0.0.0.0/0 (Experimental, just to test,
I will replace this with my IP address)
当我使用-Pn
从计算机上的主机上执行Netstat
时.我得到
When I do a Netstat
on the host from my machine with -Pn
. I get a
Host is up.
PORT STATE SERVICE
5439/tcp filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 2.22 seconds
我已经经历了几个类似的问题,这些都不对我有用.
I have already gone through several similar questions and none of these is working for me.
推荐答案
仔细检查您的安全组设置:
Double check your Security Group settings:
- 在Redshift控制台中,转到
Configuration
标签. - 单击
VPC security groups
旁边的链接- 应该将您带到EC2控制台中的
Security Groups
,并选择正确的安全组.
- 应该将您带到EC2控制台中的
- In the Redshift console, go to the
Configuration
tab. - Click on the link next to
VPC security groups
- Should take you to
Security Groups
in the EC2 console with the correct security group selected.
- Should take you to
- 从
Type
下拉菜单中选择Redshift
- 从
Source
下拉菜单中选择Anywhere
- 连接正常后,请返回并更改为
My Ip
!
- Select
Redshift
from theType
dropdown menu - Select
Anywhere
from theSource
dropdown menu- Come back and change this to
My Ip
once your connection works!
然后在SQL Workbench的选择连接配置文件"对话框中:
Then in SQL Workbench's "Select Connection Profile" dialog:
- Click "Manage Drivers" at the bottom left and to add the Redshift JDBC driver.
- SQL Workbench configures these automatically but check that
Classname
is likecom.amazon.redshift.jdbc42.Driver
andSample URL
isjdbc:redshift://host:port/name_of_database
.
- SQL Workbench configures these automatically but check that
- 从下拉列表中选择刚创建的新
Driver
. - 从Redshift控制台的配置"选项卡中复制
JDBC URL
,并将其粘贴到URL
字段中.- 必须使用正确的端口:
jdbc:redshift://my-cluster.asdfgh5jk8.us-east-1.redshift.amazonaws.com:
5439/my-db
- Select the new
Driver
you just created from the drop down. - Copy the
JDBC URL
from the Redshift console Configuration tab and paste it into theURL
field.- Must use the correct port:
jdbc:redshift://my-cluster.asdfgh5jk8.us-east-1.redshift.amazonaws.com:
5439/my-db
如果由于某种原因该方法不起作用,请在评论中让我知道,我将帮助您使其正常工作.
Please let me know in the comments if this doesn't work for some reason and I'll help you get it working.
这篇关于Amazon 500150:无法连接到Redshift Cluster的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- Must use the correct port:
- 必须使用正确的端口:
- Come back and change this to
- 连接正常后,请返回并更改为