Zabbix server is not running

Задача:
---------------------------------------------------------------Ошибка zabbix сервера: Zabbix server is not running: the information displayed may not be current. (
Сервер Zabbix не запущен: отображаемая информация может быть неактивной)
Ошибка возникла не сервере с операционной системой Ubuntu
root@zbs:/home/asv# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal root@zbs:/home/asv# uname -a Linux zbs 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux root@zbs:/home/asv#
При открытии веб-интерфейса, в самом низу окна появилось сообщение: “
Zabbix server is not running: the information displayed may not be current.“

При попытки запустить, какой либо скрипт, также ошибка
Cannot execute script.
• Connection to Zabbix server “localhost” refused. Possible reasons:
• 1. Incorrect server IP/DNS in the “zabbix.conf.php”;
• 2. Security environment (for example, SELinux) is blocking the connection;
• 3. Zabbix server daemon not running;
• 4. Firewall is blocking TCP connection.
• Connection refused

Проверяем запущен ли zabbix сервер

Делаем бекап лог-файла, очищаем и перезапускаем сервер и опять проверяем логи.
root@zbs:/home/asv# service zabbix-server stop root@zbs:/home/asv# cp /var/log/zabbix/zabbix_server.log /var/log/zabbix/zabbix_server.log_2021-09-23 root@zbs:/home/asv# echo > /var/log/zabbix/zabbix_server.log root@zbs:/home/asv# service zabbix-server start root@zbs:/home/asv# cat /var/log/zabbix/zabbix_server.log 708375:20210923:101151.286 Starting Zabbix Server. Zabbix 5.4.4 (revision 1765c4f1bc). 708375:20210923:101151.286 ****** Enabled features ****** 708375:20210923:101151.286 SNMP monitoring: YES 708375:20210923:101151.286 IPMI monitoring: YES 708375:20210923:101151.286 Web monitoring: YES 708375:20210923:101151.286 VMware monitoring: YES 708375:20210923:101151.286 SMTP authentication: YES 708375:20210923:101151.286 ODBC: YES 708375:20210923:101151.286 SSH support: YES 708375:20210923:101151.286 IPv6 support: YES 708375:20210923:101151.286 TLS support: YES 708375:20210923:101151.286 ****************************** 708375:20210923:101151.286 using configuration file: /etc/zabbix/zabbix_server.conf 708375:20210923:101151.298 current database version (mandatory/optional): 05040000/05040000 708375:20210923:101151.298 required mandatory version: 05040000 708375:20210923:101151.312 server #0 started [main process] 708376:20210923:101151.313 server #1 started [configuration syncer #1] 708376:20210923:101151.538 __mem_malloc: skipped 0 asked 24 skip_min 18446744073709551615 skip_max 0 708376:20210923:101151.538 [file:dbconfig.c,line:102] __zbx_mem_realloc(): out of memory (requested 16 bytes) 708376:20210923:101151.538 [file:dbconfig.c,line:102] __zbx_mem_realloc(): please increase CacheSize configuration parameter 708376:20210923:101151.538 === memory statistics for configuration cache === 708376:20210923:101151.538 min chunk size: 18446744073709551615 bytes 708376:20210923:101151.538 max chunk size: 0 bytes 708376:20210923:101151.538 memory of total size 7263752 bytes fragmented into 70281 chunks 708376:20210923:101151.538 of those, 0 bytes are in 0 free chunks 708376:20210923:101151.538 of those, 7263752 bytes are in 70281 used chunks 708376:20210923:101151.538 of those, 1124480 bytes are used by allocation overhead 708376:20210923:101151.538 ================================ 708376:20210923:101151.538 === Backtrace: === 708376:20210923:101151.540 11: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](zbx_backtrace+0x52) [0x558eabf24a1a] 708376:20210923:101151.540 10: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](__zbx_mem_realloc+0x164) [0x558eabf1efd1] 708376:20210923:101151.540 9: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](+0x1b7fa3) [0x558eabea0fa3] 708376:20210923:101151.540 8: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](+0x1c6c5c) [0x558eabeafc5c] 708376:20210923:101151.540 7: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](DCsync_configuration+0x14b8) [0x558eabeb1407] 708376:20210923:101151.540 6: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](dbconfig_thread+0x126) [0x558eabd5407b] 708376:20210923:101151.540 5: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](zbx_thread_start+0x3b) [0x558eabf35f5f] 708376:20210923:101151.540 4: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](MAIN_ZABBIX_ENTRY+0xb59) [0x558eabd407ab] 708376:20210923:101151.540 3: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](daemon_start+0x303) [0x558eabf2455c] 708376:20210923:101151.540 2: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](main+0x309) [0x558eabd3fb34] 708376:20210923:101151.540 1: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f0f627f70b3] 708376:20210923:101151.540 0: /usr/sbin/zabbix_server: configuration syncer [syncing configuration](_start+0x2e) [0x558eabd3e94e] 708375:20210923:101151.545 One child process died (PID:708376,exitcode/signal:1). Exiting ... 708375:20210923:101151.547 syncing trend data... 708375:20210923:101151.547 syncing trend data done 708375:20210923:101151.547 Zabbix Server stopped. Zabbix 5.4.4 (revision 1765c4f1bc). root@zbs:/home/asv#

Из логов заслуживаем внимание несколько строк:
709254:20210923:101338.940 __mem_malloc: skipped 0 asked 24 skip_min 18446744073709551615 skip_max 0 709254:20210923:101338.941 [file:dbconfig.c,line:102] __zbx_mem_realloc(): out of memory (requested 16 bytes) 709254:20210923:101338.941 [file:dbconfig.c,line:102] __zbx_mem_realloc(): please increase CacheSize configuration parameter
проверяем конфигурационный файл забикс сервера
root@zbs:/home/asv# grep "CacheSize" /etc/zabbix/zabbix_server.conf ### Option: VMwareCacheSize # VMwareCacheSize=8M ### Option: CacheSize # CacheSize=8M ### Option: HistoryCacheSize # HistoryCacheSize=16M ### Option: HistoryIndexCacheSize # HistoryIndexCacheSize=4M ### Option: TrendCacheSize # TrendCacheSize=4M ### Option: TrendFunctionCacheSize # TrendFunctionCacheSize=4M ### Option: ValueCacheSize # ValueCacheSize=8M root@zbs:/home/asv#
Конечно стоит посмотреть графики использования кеша и на основании их уже сделать выводы на сколько стоит увеличить. Но так как я практически не ограничен в оперативной памяти, указал сразу 512M
root@zbs:/home/asv# vi /etc/zabbix/zabbix_server.conf
изменяемый раздел конфига
### Option: CacheSize # Size of configuration cache, in bytes. # Shared memory size for storing host, item and trigger data. # # Mandatory: no # Range: 128K-64G # Default: # CacheSize=8M CacheSize=512M

Проверяем запуск сервера:
root@zbs:/home/asv# service zabbix-server start root@zbs:/home/asv# cat /var/log/zabbix/zabbix_server.log 730027:20210923:105730.355 Starting Zabbix Server. Zabbix 5.4.4 (revision 1765c4f1bc). 730027:20210923:105730.355 ****** Enabled features ****** 730027:20210923:105730.355 SNMP monitoring: YES 730027:20210923:105730.355 IPMI monitoring: YES 730027:20210923:105730.355 Web monitoring: YES 730027:20210923:105730.355 VMware monitoring: YES 730027:20210923:105730.356 SMTP authentication: YES 730027:20210923:105730.356 ODBC: YES 730027:20210923:105730.356 SSH support: YES 730027:20210923:105730.356 IPv6 support: YES 730027:20210923:105730.356 TLS support: YES 730027:20210923:105730.356 ****************************** 730027:20210923:105730.356 using configuration file: /etc/zabbix/zabbix_server.conf 730027:20210923:105730.365 current database version (mandatory/optional): 05040000/05040000 730027:20210923:105730.365 required mandatory version: 05040000 730027:20210923:105730.375 server #0 started [main process] 730028:20210923:105730.376 server #1 started [configuration syncer #1] 730029:20210923:105730.879 server #2 started [alert manager #1] 730030:20210923:105730.880 server #3 started [alerter #1] 730031:20210923:105730.880 server #4 started [alerter #2] 730033:20210923:105730.881 server #6 started [preprocessing manager #1] 730032:20210923:105730.881 server #5 started [alerter #3] 730035:20210923:105730.882 server #8 started [preprocessing worker #2] 730036:20210923:105730.883 server #9 started [preprocessing worker #3] 730037:20210923:105730.883 server #10 started [lld manager #1] 730038:20210923:105730.883 server #11 started [lld worker #1] 730039:20210923:105730.884 server #12 started [lld worker #2] 730040:20210923:105730.885 server #13 started [housekeeper #1] 730041:20210923:105730.885 server #14 started [timer #1] 730042:20210923:105730.886 server #15 started [http poller #1] 730043:20210923:105730.886 server #16 started [discoverer #1] 730044:20210923:105730.887 server #17 started [history syncer #1] 730045:20210923:105730.887 server #18 started [history syncer #2] 730046:20210923:105730.889 server #19 started [history syncer #3] 730047:20210923:105730.889 server #20 started [history syncer #4] 730048:20210923:105730.889 server #21 started [escalator #1] 730049:20210923:105730.890 server #22 started [proxy poller #1] 730050:20210923:105730.890 server #23 started [self-monitoring #1] 730051:20210923:105730.891 server #24 started [task manager #1] 730052:20210923:105730.891 server #25 started [poller #1] 730054:20210923:105730.892 server #27 started [poller #3] 730055:20210923:105730.893 server #28 started [poller #4] 730056:20210923:105730.894 server #29 started [poller #5] 730057:20210923:105730.894 server #30 started [unreachable poller #1] 730058:20210923:105730.895 server #31 started [trapper #1] 730059:20210923:105730.895 server #32 started [trapper #2] 730053:20210923:105730.896 server #26 started [poller #2] 730062:20210923:105730.897 server #35 started [trapper #5] 730060:20210923:105730.897 server #33 started [trapper #3] 730064:20210923:105730.898 server #37 started [alert syncer #1] 730061:20210923:105730.899 server #34 started [trapper #4] 730063:20210923:105730.899 server #36 started [icmp pinger #1] 730065:20210923:105730.899 server #38 started [history poller #1] 730067:20210923:105730.901 server #40 started [history poller #3] 730068:20210923:105730.902 server #41 started [history poller #4] 730070:20210923:105730.903 server #43 started [availability manager #1] 730066:20210923:105730.903 server #39 started [history poller #2] 730069:20210923:105730.903 server #42 started [history poller #5] 730034:20210923:105730.982 server #7 started [preprocessing worker #1] root@zbs:/home/asv#
Свежие комментарии