大家好。我有一个新的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访问它并尝试连接服务器数据库,我会收到以下错误信息:
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已打开,防火墙已禁用。有人经历过这种情况吗?