当前位置: 首页 > news >正文

高端模板网站建设公司移动端网站建设 新闻动态

高端模板网站建设公司,移动端网站建设 新闻动态,易营宝智能建站,门户网站构建近期将zabbix平台从V6.2.6升级到7.2.4,遇到问题“PostgresoL server is not available. Waiting 5seconds”,容器无法访问Postgres V17数据库,本文记录问题解决过程。 一、系统环境 1、数据库版本 数据库版本:postgres-17.4-tim…

近期将zabbix平台从V6.2.6升级到7.2.4,遇到问题“PostgresoL server is not available. Waiting 5seconds”,容器无法访问Postgres V17数据库,本文记录问题解决过程。

一、系统环境

1、数据库版本

数据库版本:postgres-17.4-timescale-2.17.2,如下:

#  psql -U zabbix  zabbix -h 192.168.128.111  
Password for user zabbix: 
psql (13.3, server 17.4)
WARNING: psql major version 13, server major version 17.Some psql features might not work.
Type "help" for help.zabbix=> \dxList of installed extensionsName     | Version |   Schema   |                                      Description                              -------------+---------+------------+-------------------------------------------------------------------------------
--------plpgsql     | 1.0     | pg_catalog | PL/pgSQL procedural languagetimescaledb | 2.17.2  | public     | Enables scalable inserts and complex queries for time-series data (Community E
dition)
(2 rows)zabbix=> \q

2、zabbix服务器容器版本

zabbix/zabbix-web-apache-pgsql:centos-7.2.4
zabbix/zabbix-server-pgsql:centos-7.2.4

二、报错信息

zabbix服务器连接数据库报错:“PostgresoL server is not available. Waiting 5seconds”

三、问题分析

1、数据库版本是否兼容

 从zabbix官网,可以看到相关数据库版本在兼容清单的

support for PostgreSQL versions:- 17.X  

support for TimescaleDB versions: 2.17.X 

 2、测试数据库外部连接情况
#  psql -U zabbix  zabbix -h 192.168.128.111  
Password for user zabbix: 
psql (13.3, server 17.4)
WARNING: psql major version 13, server major version 17.Some psql features might not work.
Type "help" for help.zabbix=> \dxList of installed extensionsName     | Version |   Schema   |                                      Description                              -------------+---------+------------+-------------------------------------------------------------------------------
--------plpgsql     | 1.0     | pg_catalog | PL/pgSQL procedural languagetimescaledb | 2.17.2  | public     | Enables scalable inserts and complex queries for time-series data (Community E
dition)
(2 rows)zabbix=> \q

 可以看到,数据库外部访问正常,可以查询到库的信息,可以排除数据库自身的问题。

3、问题定位

经过本人全面检查,最终查到本问题是因为zabbix服务器官方容器包的问题。

原因为zabbix使用--list来检查数据库服务是否存活,在容器外本地使用该命令,反馈信息如下:

# psql -U zabbix  zabbix -h 192.168.128.111 --list
Password for user zabbix: List of databasesName    |  Owner   | Encoding  | Collate | Ctype |   Access privileges   
-----------+----------+-----------+---------+-------+-----------------------postgres  | postgres | SQL_ASCII | C       | C     | template0 | postgres | SQL_ASCII | C       | C     | =c/postgres          +|          |           |         |       | postgres=CTc/postgrestemplate1 | postgres | SQL_ASCII | C       | C     | =c/postgres          +|          |           |         |       | postgres=CTc/postgreszabbix    | zabbix   | UTF8      | C       | C     | 
(4 rows)

登入zabbix服务器容器,可以看到容器内封装的PostgreSQL客户端版本为16.6,该命令执行反馈信息报错“column d.daticulocale does not exist”:

# docker exec -it zbxsrv /bin/bash
bash-5.1$ psql -V
psql (PostgreSQL) 16.6
bash-5.1$ psql -h 192.168.128.111 -U zabbix -d zabbix --list
Password for user zabbix: 
psql: ERROR:  column d.daticulocale does not exist
LINE 8:   d.daticulocale as "ICU Locale",^
HINT:  Perhaps you meant to reference the column "d.datlocale".
bash-5.1$ cat /etc/centos-release 
CentOS Stream release 9

 且zabbix官方Centos、ubuntu系统容器包都存在此问题。

四、解决办法

使用zabbix官方alpine系统平台的服务器容器镜像。

zabbix/zabbix-server-pgsql:alpine-7.2-latestalpine-7.2-latest(目前实际是7.2.4)

zabbix/zabbix-web-apache-pgsql:alpine-7.2.4

如下:

[root@localhost ~]# docker pull zabbix/zabbix-server-pgsql:alpine-7.2-latest
alpine-7.2-latest: Pulling from zabbix/zabbix-server-pgsql
f18232174bc9: Already exists 
145118636fb4: Pull complete 
2e36442cfc45: Pull complete 
90bbfafe739a: Pull complete 
ff10713dcc30: Pull complete 
39a26e625a05: Pull complete 
4f4fb700ef54: Pull complete 
db0d9b0bdf27: Pull complete 
Digest: sha256:c8db24a3fc509ea4b1a3d9f4ef197e1ee46f2656f586c3c5f9014ca6de61804b
Status: Downloaded newer image for zabbix/zabbix-server-pgsql:alpine-7.2-latest
docker.io/zabbix/zabbix-server-pgsql:alpine-7.2-latest
[root@localhost ~]# docker pull zabbix/zabbix-web-apache-pgsql:alpine-7.2.4
alpine-7.2.4: Pulling from zabbix/zabbix-web-apache-pgsql
f18232174bc9: Already exists 
0068142ce15f: Pull complete 
a2c25e127afd: Pull complete 
0f6189e461cd: Pull complete 
4f4fb700ef54: Pull complete 
5d085b3ca5ae: Pull complete 
Digest: sha256:3e91ca4aad3bd051ed33cdfa343fb9711b9dd5a33518798926af862a9bae4c41
Status: Downloaded newer image for zabbix/zabbix-web-apache-pgsql:alpine-7.2.4
docker.io/zabbix/zabbix-web-apache-pgsql:alpine-7.2.4

运行容器,可以看到,服务器已正常连接:

 问题得到解决。

http://www.dtcms.com/a/542327.html

相关文章:

  • 四川省住房和城乡建设厅网站不见了html5制作手机网站
  • 有网站域名及空间 别人帮建网站品牌建设方案范文
  • 环氧乙烷气体检测技术及其在工业安全中的应用
  • 做网站找哪个公司宣传册排版
  • 全球电力氮化镓市场将高速扩张
  • 马斯克旗下xAI公司推出的在线百科全书“Grokipedia”现已上线
  • (论文速读)OpenHumanVid:用于增强以人为中心的视频生成的大规模高质量数据集
  • 扁平化网站设计教程外贸建站的公司
  • 谷歌镜像网站怎么做个人养老金制度相关细则
  • 数据结构——三十一、最小生成树(王道408)
  • MySQL | Windows中mysql的卸载
  • 学前端什么网站好松滋市住房和城乡建设局网站
  • 国际网站排名查询seo运营推广
  • springboot接入企业微信群机器人消息推送
  • 杭州做绒毛鉴定网站wordpress怎么添加导航分类
  • 建设企业网站怎么样公司注册资金500万实缴多少
  • 成都做网站建设公司hdsyscms企业建站系统
  • esp32学习随笔文档1
  • 化妆品网站设计开题报告整站优化快速排名
  • 高端网站建设好的公司设计网站app
  • LLM和智能体的区别
  • End-To-End之于推荐-快手OneRec系列三(OneRec-Think)
  • 做游戏模板下载网站有哪些网站建设策划稿
  • 《投资-143》如何实现“过去思维”向“未来思维”的转变?
  • 做网站的开发软件企业网站 备案 网站名称
  • 企业网站seo实四川建筑培训考试网
  • 石家庄哪里做微网站宁夏自治区住房与城乡建设厅网站
  • 把文件删除了怎么恢复,8个文件恢复方案找回误删除的文件
  • 做会计题目的网站酒店网站建设哪家好
  • 响应式mvc企业网站源码苏州高端网站设计机构