无法从其他系统连接到Postgres数据库

时间:2015-12-29 10:17:25

标签: postgresql

我已经将postgressql.conf中的listen_address配置为' *'

             listen_addresses = '*'     # what IP address(es) to listen on;
                # comma-separated list of addresses;
                # defaults to 'localhost'; use '*' for all
                # (change requires restart)

还在pg_hba.conf中添加了所需的更改

     host    all     postgres    192.168.1.85/24     trust
     host    all     postgres    ::85/128    trust

当我尝试从远程系统连接时,我无法连接。是否还有其他配置需要连接远程系统db?

错误消息

  Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
   Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)   
 Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  Caused by: java.net.ConnectException: Connection timed out: connect

0 个答案:

没有答案