Postgres连接被主动拒绝

时间:2015-01-12 20:21:55

标签: postgresql-9.3

我在从java app连接到postgres时遇到问题。我可以使用postgres角色和正确的密码从pgAdminIII登录

<db.host>127.0.0.1</db.host>
<db.port>5432</db.port>
<db.schema>test</db.schema>
<db.username>postgres</db.username>
<db.password>admin</db.password>

但是当我尝试从应用程序连接时,我收到以下错误:

  

无法从客户端接收数据:无法建立连接,因为目标计算机主动拒绝它。

我没有改变pg_hba.conf,默认情况下它有以下参数:

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

我还尝试禁用Windows防火墙,没有任何反应。这真的很奇怪,因为我以前连接没有问题。如果有人能提供帮助,我们将非常感激。

我正在使用postgres 9.4。

我已经检查了相关问题,但没有一个能解决我的问题。

0 个答案:

没有答案