我正在尝试使用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
heroku version
和heroku pg:info
的输出是什么? - RangerRangernetstat -a -n | find "5432"
,看起来它工作正常。TCP 0.0.0.0:5432 0.0.0.0:0 LISTENING TCP [::]:5432 [::]:0 LISTENING
。此外,我尝试关闭防火墙,但仍无法连接到数据库。 - Bla...