docker zabbix-server-pgsql 提示缓存不存导致无法启动,

错误提示如下:

2021-04-27T09:47:49.236297381Z 8:20210427:094749.236 Starting Zabbix Server. Zabbix 5.2.6 (revision 7985065).
2021-04-27T09:47:49.236314367Z 8:20210427:094749.236 Enabled features
2021-04-27T09:47:49.236324158Z 8:20210427:094749.236 SNMP monitoring: YES
2021-04-27T09:47:49.236449648Z 8:20210427:094749.236 IPMI monitoring: YES
2021-04-27T09:47:49.236468827Z 8:20210427:094749.236 Web monitoring: YES
2021-04-27T09:47:49.236478629Z 8:20210427:094749.236 VMware monitoring: YES
2021-04-27T09:47:49.236487340Z 8:20210427:094749.236 SMTP authentication: YES
2021-04-27T09:47:49.236495934Z 8:20210427:094749.236 ODBC: YES
2021-04-27T09:47:49.236504342Z 8:20210427:094749.236 SSH support: YES
2021-04-27T09:47:49.236512741Z 8:20210427:094749.236 IPv6 support: YES
2021-04-27T09:47:49.236521095Z 8:20210427:094749.236 TLS support: YES
2021-04-27T09:47:49.236529473Z 8:20210427:094749.236 **
2021-04-27T09:47:49.236538077Z 8:20210427:094749.236 using configuration file: /etc/zabbix/zabbix_server.conf
2021-04-27T09:47:49.258755045Z 8:20210427:094749.258 current database version (mandatory/optional): 05020000/05020000
2021-04-27T09:47:49.258804383Z 8:20210427:094749.258 required mandatory version: 05020000
2021-04-27T09:47:49.315267294Z 8:20210427:094749.313 server #0 started [main process]
2021-04-27T09:47:49.315336094Z 201:20210427:094749.314 server #1 started [configuration syncer #1]
2021-04-27T09:47:49.933151042Z 201:20210427:094749.932 __mem_malloc: skipped 0 asked 24 skip_min 18446744073709551615 skip_max 0
2021-04-27T09:47:49.933170580Z 201:20210427:094749.932 [file:dbconfig.c,line:98] __zbx_mem_realloc(): out of memory (requested 24 bytes)
2021-04-27T09:47:49.933180619Z 201:20210427:094749.932 [file:dbconfig.c,line:98] __zbx_mem_realloc(): please increase CacheSize configuration parameter
2021-04-27T09:47:49.933189815Z 201:20210427:094749.932 === memory statistics for configuration cache ===
2021-04-27T09:47:49.933198738Z 201:20210427:094749.933 min chunk size: 18446744073709551615 bytes
2021-04-27T09:47:49.933207521Z 201:20210427:094749.933 max chunk size: 0 bytes
2021-04-27T09:47:49.933288143Z 201:20210427:094749.933 memory of total size 7209976 bytes fragmented into 73642 chunks
2021-04-27T09:47:49.933332773Z 201:20210427:094749.933 of those, 0 bytes are in 0 free chunks
2021-04-27T09:47:49.933369571Z 201:20210427:094749.933 of those, 7209976 bytes are in 73642 used chunks
2021-04-27T09:47:49.933379549Z 201:20210427:094749.933 of those, 1178256 bytes are used by allocation overhead
2021-04-27T09:47:49.933388631Z 201:20210427:094749.933 ================================

直接修改zabbix_server.conf文件中的CacheSize,重启后,会自动删除配置文件,只能删除运行镜像,重新配置启动参数。修改ZBX_CACHESIZE参数

示例如下

docker run --name zabbix-server-pgsql -t \
-e DB_SERVER_HOST="postgres-server" \
-e POSTGRES_USER="zabbix" \
-e POSTGRES_PASSWORD="zabbix_pwd" \
-e POSTGRES_DB="zabbix" \
-e ZBX_ENABLE_SNMP_TRAPS="true" \
-e ZBX_CACHESIZE=1024M \
--network=zabbix-net \
-p 10051:10051 \
--volumes-from zabbix-snmptraps \
--restart unless-stopped \
-d zabbix/zabbix-server-pgsql:ubuntu-5.2-latest

作者 Qi, Asura

发表回复

您的电子邮箱地址不会被公开。