【发布时间】:2016-09-26 02:37:22
【问题描述】:
我使用ubuntu 14.04 和postgresql 9.5。
我已经在 ufw 中允许了端口,并在 postgresql 中设置了配置文件。但我也连接不上它。
如果我尝试使用telnet 连接到我的服务器的 5432 端口,它也会连接超时。
ufw 设置: ➜ ~ ufw 状态 状态:活跃
To Action From
-- ------ ----
80 ALLOW Anywhere
443 ALLOW Anywhere
22 ALLOW Anywhere
5432 ALLOW Anywhere
8000 ALLOW Anywhere
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
5432 (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
8000 (v6) ALLOW Anywhere (v6)
pg_hba:
local all postgres peer
host all all all md5
postgresql.conf
listen_addresses = '*'
port = 5432
【问题讨论】:
-
它看起来像是损坏的 pg_hba.conf - 缺少 IP 掩码
-
@PavelStehule 我试过了。但什么都没有改变。相同的配置可以在我的其他 Centos 系统上运行。但现在是 Ubuntu。
-
你检查防火墙了吗
-
@PavelStehule 是的,我知道原因。我的 vps 提供商关闭了除 22 和 80 以外的所有端口
标签: postgresql ubuntu ufw