postgresql - heroku postgresql 无法连接到服务器 : Connection timed out

标签 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

最佳答案

以防其他人遇到此问题。我有同样的问题。我不得不通过将本地计算机上的防火墙级别更改为“低”来降低我的网络安全性并且它起作用了。

关于postgresql - heroku postgresql 无法连接到服务器 : Connection timed out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53065789/

相关文章:

sql - Postgres 序列值插入

python - 为什么我创建的 postgres 用户被拒绝访问表?

postgresql - 使用 dart 将数据插入 Postgres 数据库

java - Heroku Spring Boot 启动

postgresql - 如何在 PgTAP 中设置 pg_prove 的数据库密码?

java - 属性 'driverClassName' 抛出异常;嵌套异常是 java.lang.IllegalStateException : Could not load JDBC driver class

ruby-on-rails - (#5) Heroku Rails APP 上的未授权源 IP 地址错误

multithreading - Sidekiq 在单个 heroku dyno 中运行多个作业?

python - Heroku 应用程序 : ModuleNotFoundError: No module named 'pwa'

ruby-on-rails - Heroku上的Rails ActionMailer拦截器