heroku postgresql无法连接到服务器:连接超时

时间:2018-10-30 13:48:20

标签: postgresql heroku

我正在尝试使用heroku pg:psql postgresql-rigid-33416 --app murmuring-ocean-62645连接到heroku中的postgres数据库,但是我收到了此消息

--> Connecting to postgresql-rigid-33416
psql: could not connect to server: Connection timed out (0x0000274C/10060)
        Is the server running on host "ec2-50-17-225-140.compute-1.amazonaws.com" (50.17.225.140) and accepting
        TCP/IP connections on port 5432?

我试图关闭防火墙,但问题仍然存在。知道如何解决这个问题吗?

编辑:

heroku version
heroku/7.16.0 win32-x64 node-v10.10.0

heroku pg:info
=== DATABASE_URL
Plan:                  Hobby-dev
Status:                Available
Connections:           0/20
PG Version:            10.5
Created:               2018-10-09 14:03 UTC
Data Size:             7.6 MB
Tables:                0
Rows:                  0/10000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-rigid-33416

1 个答案:

答案 0 :(得分:0)

以防其他人遇到此问题。我有同样的问题。我必须通过将本地计算机上的防火墙级别更改为“低”来降低网络安全性。