我可以访问远程 postgesql psql -h xxx.xxx.xxx.xxx -p 1486 postgres
显示这个错误
psql: could not connect to server: Connection refused
Is the server running on host "xxx.xxx.xxx.xxx" and accepting
TCP/IP connections on port 1486?
postgresql.conf 文件
listen_addresses = '*'
pg_hba.conf 文件
host all all 0.0.0.0/0 md5
同时申请开放的1486端口
iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d X.X.X.X --dport 1486 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -s X.X.X.X --sport 1486 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
返回同样的错误。
答案 0 :(得分:0)
很难给出规范的答案,但可以尝试以下几点(其中一些可能不适用/可能):