【发布时间】:2018-06-21 08:15:15
【问题描述】:
全部。我有一个新的 Ubuntu 17.04 服务器设置。我可以通过 ssh 成功访问它。另外,我安装了一个 postgresql 数据库。它已经被配置为通过以下配置接受远程连接:
pg_hba.conf
host all all 0.0.0.0/0 md5
postgresql.conf
listen_addresses = '*'
但是当我尝试从我的计算机访问数据库时,我收到以下错误:
psql -h [SERVER_IP] -d db_production -U dbuser
psql: SSL error: unknown protocol
expected authentication request from server, but received S
我还在服务器内部运行了一个 docker 容器。如果我通过 /bin/bash 访问它并尝试连接服务器 db,我会收到此错误:
psql -h [SERVER_IP] -d db_production -U dbuser
psql: could not connect to server: Connection refused
Is the server running on host "[SERVER_IP]" and accepting
TCP/IP connections on port 5432?
5432 端口打开,防火墙被禁用。有人经历过吗?
【问题讨论】:
标签: postgresql ubuntu ssl psql