postgresql - 为什么我无法远程访问我的 postgres?

标签 postgresql timeout remote-access

我在 Ubuntu 服务器上安装了 Postgres 10.3 服务器。

我进行了必要的设置,这些设置始终足以能够从我的笔记本电脑上的 PGAdmin 访问它,但这次不起作用。

我尝试了以下步骤:

listen_addresses = '*'
host all all 0.0.0.0/0 trust
ufw allow 5432
Postgresql restarted
Server rebooted
Server pinged with success
Restarted the VPN-Client
direct IP instead of VPN-IP
disabled IPTABLES

本地可以连接到服务器,但远程仍然无法工作。

当我尝试连接时,postgres 似乎并没有阻止它,但之前有一些东西:

Unable to connect to server:

could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "10.8.0.50" and accepting
TCP/IP connections on port 5432?

可能是什么原因?

最佳答案

服务器设置完毕后,Plesk 也已安装。

Plesk 有自己的防火墙,拒绝连接。允许之后,它完美地工作了。

关于postgresql - 为什么我无法远程访问我的 postgres?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49921200/

相关文章:

ruby-on-rails - 15 个问题游戏的数据库设置和设计 - PostgreSQL 和 Rails

java - 访问远程服务器时 MySQL 连接出错

windows - "Remote machine is AAD"但 "The logon attempt failed"

python - 在 python 3 中正确使用 httplib2? (超时问题)

php - 在 PHP 中动态更改 mysqli 连接超时

PHP脚本超时

ssh - 通过图形文件管理器上的中间机器访问远程文件夹

postgresql - postgres中的月份(仅月份)的数据类型是什么?

SQL:在 sql 查询中的 2 个位置的 Where 子句

postgresql - 在 PostgreSQL 中更新引用表时如何违反重复键约束(Unique_Violation)?