You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Patroni集群07节点PostgreSQL报错:fe_sendauth未提供密码

Patroni集群07节点连接主库认证失败问题

环境与集群信息

  • 集群节点构成:2个Patroni节点(07、08)、1个HAProxy节点(06)、1个etcd节点(05)
  • 数据库版本:PostgreSQL 12.13
  • 操作系统:Ubuntu 20.04
  • 当前状态:08节点已成功加入集群,07节点无法正常连接主库,持续报错

重启07节点PostgreSQL后的错误日志

postgres@07:~$ pg_ctl restart
waiting for server to shut down.... done
server stopped
waiting for server to start....2023-02-24 12:41:27.350 +03 [484335] LOG:  starting PostgreSQL 12.13 (Ubuntu 12.13-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
2023-02-24 12:41:27.350 +03 [484335] LOG:  listening on IPv4 address "10.3.3.197", port 5432
2023-02-24 12:41:27.351 +03 [484335] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-02-24 12:41:27.372 +03 [484336] LOG:  database system was shut down in recovery at 2023-02-24 12:41:27 +03
2023-02-24 12:41:27.372 +03 [484336] LOG:  entering standby mode
2023-02-24 12:41:27.375 +03 [484336] LOG:  redo starts at 0/3000718
2023-02-24 12:41:27.375 +03 [484336] LOG:  consistent recovery state reached at 0/3000800
2023-02-24 12:41:27.375 +03 [484336] LOG:  invalid record length at 0/3000800: wanted 24, got 0
2023-02-24 12:41:27.376 +03 [484335] LOG:  database system is ready to accept read only connections
2023-02-24 12:41:27.384 +03 [484340] FATAL:  could not connect to the primary server: fe_sendauth: no password supplied
2023-02-24 12:41:27.390 +03 [484341] FATAL:  could not connect to the primary server: fe_sendauth: no password supplied
 done
server started
postgres@07:~$ 2023-02-24 12:41:32.392 +03 [484372] FATAL:  could not connect to the primary server: fe_sendauth: no password supplied
2023-02-24 12:41:37.418 +03 [484403] FATAL:  could not connect to the primary server: fe_sendauth: no password supplied
2023-02-24 12:41:42.399 +03 [484434] FATAL:  could not connect to the primary server: fe_sendauth: no password supplied
...

已执行的排查操作

  • 修改了pg_hba.conf或postgresql.conf配置文件
  • 执行了配置重载:使用命令pg_ctl reload,或在数据库内执行SELECT pg_reload_conf();
  • 上述操作后,报错仍持续出现

内容的提问来源于stack exchange,提问作者HAKAN MAZI

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 00:45:34