【发布时间】:2021-09-11 00:30:13
【问题描述】:
postgres@name-prod-psql-197fb74f68-9psrh:/$ psql "host=name-prod.postgres.database.azure.com port=5432 dbname=prod user=user password=XXX"
psql: error: could not connect to server: Connection timed out
Is the server running on host "name-prod.postgres.database.azure.com" (10.110.0.4) and accepting
TCP/IP connections on port 5432?
如果我在 POD 内运行 traceroute
[root@utils /]# traceroute name-prod.postgres.database.azure.com
traceroute to name-prod.postgres.database.azure.com (10.110.0.4), 30 hops max, 60 byte packets
1 10-240-0-226.prometheus-node-exporter.prometheus.svc.cluster.local (10.240.0.226) 0.037 ms 0.019 ms 0.009 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
以前可以工作8天,然后突然停止。
- Postgres 位于子网 10.110.0.0/16
- 在
prod-private-eks10.240.0.0/16 中添加了Microsoft.Sql服务端点
可能是什么问题?
【问题讨论】:
-
你是否检查了这个可以与 PostgreSQL 一起使用的连接池,即 PgBouncer。它是轻量级的容器化 PgBouncer,可用于 Sidecar 以池化从 AKS 到 Azure Database for PostgreSQL 的连接:docs.microsoft.com/en-us/azure/postgresql/concepts-aks
-
PgBouncer 的新版本包含许多新功能和重要修复请检查:pgbouncer.org/2021/08/pgbouncer-1-16-0
标签: azure azure-aks azure-virtual-network azure-postgresql