Pgsql log: the connection could not be completed because the target machine actively refused it

I recently discovered that clients always wait for a timeout when they connect to the db server. You can log in here.

We have a database server in postgresql. and remotely, meanwhile, about twenty clients connect to this db server, adding, updating or deleting data.

2013-03-13 23:19:41 HKT 日志: 不 完整 的 启动 包 2013-03-13 23:31:11 HKT 日志: 无法 从 客户 端 获得 数据: the connection could not be made because the target machine actively refused From him.

2013-03-13 23:31:11 HKT 日志: 在 客户 端 联接 上 的 意外 EOF 2013-03-13 23:37:05 HKT 日志: 无法 从 客户 端 获得 数据: the connection cannot be made because the target the car actively abandoned him.

Any suggestion would be appreciated.

0
source share
1 answer

You need to change pg_hba.conf inside the postgres sql installation directory. The local IPv4 connections or the local IPv6 connections you are using.

  • For example, the initial IPv4 connection configuration

    host all all 127.0.0.1/32 md5 , which means only the local client.

  • Change local IPv4 connections to

    host all all 0.0.0.0/0 md5 means allow access to all clients.

For more information

+1
source

All Articles