我正在尝试使用Postgre JDBC驱动程序从SQL Workbench/J连接到Redshift数据库,但无法通过.我收到此错误连接尝试失败". jdbc驱动程序已正确定位.我也尝试通过Aginity Workbench for Redshift,但是它无法显示数据库列表.我有到jdbc:postgresql://host:port/name_of_database形式的数据库的连接URL,但令人惊讶的是,我什至无法ping通主机.我可以通过Amazon Console看到数据库的运行状况良好.所以,我的问题是:
I'm trying to connect to Redshift database from SQL Workbench/J using Postgre JDBC drivers but I can't get through. I get this error "The connection attempt failed". The jdbc driver is properly located. I also tried through Aginity Workbench for Redshift but it was unable to show the list of databases. I have my connection url to the database of the form jdbc:postgresql://host:port/name_of_database but surprisingly I could not even ping the host. I can see that the health of database is good through amazon console. So, my questions are:
Edit1:将我的公共IP添加到安全组后,主机在ping时得到解析,但仍然有100%的数据包丢失.
After adding my public IP to security group the host gets resolved while pinging but still there's 100% packet loss.
Edit2:我可以在EC2-Classic中成功托管数据库,但不能在EC2-VPC中成功托管该数据库.由于我的公共IP不足,因此我尝试在100%数据包丢失的VPC中重新托管数据库.
I could successfully host the db in EC2-Classic but not in EC2-VPC. Since I'm running short of public IPs I tried re-hosting the db in VPC where there is 100% packet loss.
推荐答案您必须将IP地址块添加到群集的安全组中.
You have to add your IP address block into the security group for the cluster.
这与其他安全组(即VPC)分开.
This is separate from other security groups (i.e. VPC).
您可以在Redshift控制台的左侧找到它. console.aws.amazon/redshift/
You can find it on the left in the Redshift Console. console.aws.amazon/redshift/
更多推荐
无法连接到redshift数据库
发布评论