Geoserver(VPS) 连接到 PostgreSql(localhost)
Geoserver(VPS) connection to PostgreSql(localhost)
我正在尝试将 Geoserver(安装在 VPS 中)连接到 PostgreSql 数据库,该数据库是 运行 到我的电脑(本地主机)。我已经按照步骤允许这种连接(我不知道是否需要):
POSTGRESQL:
1.- 编辑 PostgreSql 的 pg_hba.config 以允许 VPS(Geoserver) 的 Ip:
host all all ip_VPS/24 md5
2.- 编辑 postgresql.conf 以允许远程连接:
listen_addresses ='*'
WINDOWS:
1.- 允许 Ip(VPS) 访问的防火墙配置。
,但我仍然收到此连接错误:
Unable to obtain connection: Cannot create PoolableConnectionFactory
(Connection to My_Ip(pc):5432 refused. Check that the hostname and
port are correct and that the postmaster is accepting TCP/IP
connections.).
是否需要进行其他配置?
提前致谢。
0k。您在 pg_hba.config:
host all all ip_VPS/24 md5
也许你应该试试这个:
host all all ip_VPS/24 trust
然后你应该重新启动 postgres。
(对于参数"trust"或"md5"我建议复习:
www.postgresql.org/docs/9.5/static/auth-pg-hba-conf.html)
你好。
我正在尝试将 Geoserver(安装在 VPS 中)连接到 PostgreSql 数据库,该数据库是 运行 到我的电脑(本地主机)。我已经按照步骤允许这种连接(我不知道是否需要):
POSTGRESQL:
1.- 编辑 PostgreSql 的 pg_hba.config 以允许 VPS(Geoserver) 的 Ip:
host all all ip_VPS/24 md5
2.- 编辑 postgresql.conf 以允许远程连接:
listen_addresses ='*'
WINDOWS:
1.- 允许 Ip(VPS) 访问的防火墙配置。
,但我仍然收到此连接错误:
Unable to obtain connection: Cannot create PoolableConnectionFactory (Connection to My_Ip(pc):5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.).
是否需要进行其他配置?
提前致谢。
0k。您在 pg_hba.config:
host all all ip_VPS/24 md5
也许你应该试试这个:
host all all ip_VPS/24 trust
然后你应该重新启动 postgres。
(对于参数"trust"或"md5"我建议复习:
www.postgresql.org/docs/9.5/static/auth-pg-hba-conf.html)
你好。