【问题标题】:Cannot connect to RDS Postgres无法连接到 RDS Postgres
【发布时间】:2019-06-16 16:56:17
【问题描述】:

我在欧盟爱尔兰设置了一个 Postgres RDS 实例。我将所有出站流量保持为 0.0.0.0/0 并将入站流量保持为:-

Type        Protocol        Port Range   Source   Description
PostgreSQL    TCP              5432     0.0.0.0/0

当我尝试从我的 mac 终端连接到 RDS 时,我收到了这个错误 -

psql --host=test.XXXXX.eu-west-1.rds.amazonaws.com --port=5432 --username=testuser --password --dbname=testdb
Password: 
psql: could not connect to server: Operation timed out
    Is the server running on host "test.XXXXX.eu-west-1.rds.amazonaws.com" (34.255.150.234) and accepting
    TCP/IP connections on port 5432?

我在法兰克福,但我在爱尔兰部署服务器,因为我想使用法兰克福目前不可用的 AWS QuickSight。

我的操作系统防火墙也关闭了。公共访问设置为“是”。

我做错了什么?

【问题讨论】:

    标签: postgresql amazon-rds


    【解决方案1】:

    很可能,您在创建 RDS 实例时不允许公开访问。更改 RDS 实例属性以启用公共访问。

    【讨论】:

    • 那么您很可能在没有外部连接的 VPC 中创建了 RDS 实例。检查此 VPC 的路由表和 Internet 网关。
    猜你喜欢
    • 2019-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-19
    • 1970-01-01
    • 2019-03-23
    • 2017-11-25
    • 2020-04-12
    相关资源
    最近更新 更多