Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database pgadmin连接到postgresql;错误:服务器未侦听_Database_Postgresql_Connection_Pgadmin - Fatal编程技术网

Database pgadmin连接到postgresql;错误:服务器未侦听

Database pgadmin连接到postgresql;错误:服务器未侦听,database,postgresql,connection,pgadmin,Database,Postgresql,Connection,Pgadmin,我试图在pgAdmin中进行新服务器注册,但出现以下错误: “服务器未在侦听” 服务器的IP地址是:X.Y.Z.W 在pg_hba.conf中,我设置了如下访问: # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all

我试图在pgAdmin中进行新服务器注册,但出现以下错误:

“服务器未在侦听”

服务器的IP地址是:X.Y.Z.W

在pg_hba.conf中,我设置了如下访问:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
  # "local" is for Unix domain socket connections only
    local   all             all                                     peer
  # IPv4 local connections:
  host    all             all             0.0.0.0/0          md5
  host    all             all             127.0.0.1/32            md5

 # IPv6 local connections:
    host    all             all             ::1/128                 ident
当我跑步时:su postgres 然后:psql-hx.Y.Z.W-d测试-U测试 没有错误

我怎样才能解决这个错误


谢谢

所以我重新安装了pgadmin3,它工作得很好。

所以我重新安装了pgadmin3,它工作得很好。

您对pgAdmin和psql使用了相同的机器吗?您是否正在侦听
postgresql.conf
文件中的所有主机?是的。在Postgresql.conf中,我设置了Listen_addresses='*',然后就变得很棘手了。。。您可以尝试重新安装pgAdmin,并确保其版本与服务器版本兼容。此外,如果您有防火墙,您应该尝试禁用客户端的防火墙。我还没有看到其他任何东西。您是否使用相同的机器进行pgAdmin和psql?您是否正在侦听
postgresql.conf
文件中的所有主机?是的。在Postgresql.conf中,我设置了Listen_addresses='*',然后就变得很棘手了。。。您可以尝试重新安装pgAdmin,并确保其版本与服务器版本兼容。此外,如果您有防火墙,您应该尝试禁用客户端的防火墙。我还没看到别的东西。