[英]Unable to connect to postgresql remotely through pgadmin on port 8085 on Google Cloud
I've postgres server listening on all ip addresses at port 8085. Even after following the Google cloud instructions here to open the port 8085 (instead of default 5432 port) through firewall rules, I'm still getting the following error.我已经在端口 8085 上侦听所有 ip 地址的 postgres 服务器。即使按照此处的 Google 云说明通过防火墙规则打开端口 8085(而不是默认的 5432 端口),我仍然收到以下错误。 I've set up both egress and ingress firewall rules with the same ip address as the source (for ingress) and destination (for egress rules).
我已经使用相同的 ip 地址作为源(用于入口)和目标(用于出口规则)设置了出口和入口防火墙规则。
Error: could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "xx.xx.xxx.xx" and accepting TCP/IP connections on port 8085?错误:无法连接到服务器:连接超时 (0x0000274C/10060) 服务器是否在主机“xx.xx.xxx.xx”上运行并接受端口 8085 上的 TCP/IP 连接?
For ingress rule, set the following values for source and destination:对于入口规则,为源和目标设置以下值:
Source is the client that is originating the request, so the source ip is 'any' and the source port is 'any'.源是发起请求的客户端,因此源 ip 是“任意”,源端口是“任意”。 However, the destination is the server that is serving the client request.
但是,目标是为客户端请求提供服务的服务器。 So the destination ip is whatever is the public ip of your VM and destination port is 8085.
因此,目标 ip 是 VM 的公共 ip,目标端口是 8085。
For egress rule, the source and destination values are analogous to the ingress rule.对于出口规则,源和目标值类似于入口规则。 Source ip is the server ip address and the source port is 8085. Destination ip is 'any' and destination port is also 'any'.
源 ip 是服务器 ip 地址,源端口是 8085。目标 ip 是“任意”,目标端口也是“任意”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.