数据库未能完全启动,创建socket临时文件失败
2026/6/2 4:25:52 网站建设 项目流程

文章目录

  • 环境
  • 症状
  • 问题原因
  • 解决方案
  • 报错编码

环境

系统平台:Linux x86-64 Red Hat Enterprise Linux 7
版本:5.6.4

症状

后台进程缺少了autovacuum launcher process和stats collector process进程,数据库未能完全启动。

postgres 5016 5015 0 15:32 pts/2 00:00:00 -bash postgres 5169 1 0 15:34 pts/1 00:00:00 /usr/pgsql-10/bin/postgres postgres 5170 5169 0 15:34 ? 00:00:00 postgres: logger process postgres 5172 5169 0 15:34 ? 00:00:00 postgres: checkpointer process postgres 5173 5169 0 15:34 ? 00:00:00 postgres: writer process postgres 5174 5169 0 15:34 ? 00:00:00 postgres: wal writer process postgres 5175 5169 0 15:34 ? 00:00:00 postgres: archiver process postgres 5176 5169 0 15:34 ? 00:00:00 postgres: bgworker: logical replication launcher

检查数据库日志发现

2020-01-06 16:48:44.234 CST,,,7393,,5e12f46c.1ce1,2,,2020-01-06 16:48:44 CST,,0,LOG,XX000,"could not bind socket for statistics collector: Cannot assign requested address",,,,,,,,,"" 2020-01-06 16:48:44.234 CST,,,7393,,5e12f46c.1ce1,3,,2020-01-06 16:48:44 CST,,0,LOG,00000,"trying another address for the statistics collector",,,,,,,,,"" 2020-01-06 16:48:44.234 CST,,,7393,,5e12f46c.1ce1,4,,2020-01-06 16:48:44 CST,,0,LOG,XX000,"could not bind socket for statistics collector: Cannot assign requested address",,,,,,,,,""

问题原因

因为autovacuum launcher process和stats collector process进程需要通过本地回环接口收集统计信息,如果本地回环接口down掉,则这两个进程无法启动。

解决方案

启动本地回环接口。

报错编码

XX000,“could not bind socket for statistics collector: Cannot assign requested address”,“”

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询