无法从pgadmin,CLI连接到IBM PostgreSQL

问题描述 投票:0回答:1

我正在尝试连接到我在IBM中的托管PostgreSQL实例。有时它通过Pgadmin连接。我没有通过终端或C#代码(npgsql)连接的成功。以下是我得到的错误。

psql: error: could not connect to server: could not connect to server: Operation timed out
	Is the server running on host "someaddress.databases.appdomain.cloud" (xxx.xx.xxx.218) and accepting
	TCP/IP connections on port 30331?
could not connect to server: Operation timed out
	Is the server running on host "someaddress.databases.appdomain.cloud" (xxx.xx.xxx.98) and accepting
	TCP/IP connections on port 30331?
could not connect to server: Operation timed out
	Is the server running on host "someaddress.databases.appdomain.cloud" (xxx.xx.xxx.197) and accepting
	TCP/IP connections on port 30331?

令我惊讶的是,为什么通过pgadmin尝试有时会成功。错误消息也列出了3个IP,为什么?我认为IP白名单不是问题,否则错误消息将有所不同

postgresql ibm-cloud psql npgsql ibm
1个回答
0
投票

主机名必须分配了几个IP地址,这样就没有问题。

但是主机要么不存在(至少没有到它们的网络路由),要么被防火墙阻止。

© www.soinside.com 2019 - 2024. All rights reserved.