[ZBX-21227] Agent stops when system enters low power mode Created: 2022 Jun 20 Updated: 2024 Aug 12 Resolved: 2023 Feb 07 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 6.0.4 |
Fix Version/s: | 5.0.31rc1, 6.0.13rc1, 6.2.7rc1, 6.4.0beta6, 6.4 (plan) |
Type: | Problem report | Priority: | Major |
Reporter: | Victor Sklyarov | Assignee: | Aleksejs Sestakovs (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Windows 10 |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||
Issue Links: |
|
||||
Team: | |||||
Sprint: | Sprint 92 (Sep 2022), Sprint 94 (Nov 2022), Sprint 95 (Dec 2022), Sprint 96 (Jan 2023) | ||||
Story Points: | 2 |
Description |
Agent start message 57560:20220610:121141.951 agent #5 started [active checks #1] Agent stop message 57860:20220613:003040.100 Zabbix Agent stopped. Zabbix 6.0.4 (revision 3d787ff402e). Windows Log Система возобновила работу после режима сна. Системное время изменено с 2022-06-12T21:30:04.144200600Z на 2022-06-12T21:30:39.500000000Z. --13.06.2022 0:30:39 ......Система вышла из состояния пониженного энергопотребления. -- 13.06.2022 0:30:42 The situation is consistently repeated on dozens of computers |
Comments |
Comment by Edgar Akhmetshin [ 2022 Jun 21 ] |
Hello Victor, Could you please specify:
Also if it is possible - enable debug log for Zabbix Agent and go through sleep/wake up cycle. Regards, |
Comment by Victor Sklyarov [ 2022 Jun 22 ] |
1. Win10 1709
Диспетчер питания ядра инициировал завершение работы.
Диспетчер питания ядра инициировал завершение работы.
Уведомление о выходе пользователя для программы улучшения качества ПО
Система переходит в спящий режим. -21.06.2022 8:36:11
Система возобновила работу после режима сна. - 21.06.2022 8:36:15
Системное время изменено с 2022-06-21T05:36:15.696737400Z на 2022-06-
Встроенное ПО сообщило метрики загрузки.
Число вариантов загрузки данной системы: 0x1.
Диспетчер загрузки затратил 0 мс на ожидание ввода данных пользователем.
Использовалась следующая политика меню загрузки: 0x1.
Использовался следующий тип загрузки: 0x1.
Журнал доступа в кусте \Device\HarddiskVolume2\EFI\Microsoft\Boot\BCD очищен; обновлено разделов: 127; создано измененных страниц: 11. --21.06.2022 8:39:36
-+*-At this point, the agent falls 15420:20220621:083936.769 Zabbix Agent stopped. Zabbix 6.0.4*+
Система вышла из состояния пониженного энергопотребления. -21.06.2022 8:39:38
The Kernel Power Manager Triggered Shutdown event occurs infrequently, once every few days, and without any apparent period. Getting extended debug is difficult |
Comment by Edgar Akhmetshin [ 2022 Jun 23 ] |
Victor, We can not reproduce using Windows for 10 and 11 on several laptops used everyday. Please provide debug log. Regards, |
Comment by Victor Sklyarov [ 2022 Jun 23 ] |
OK. What level of debug is needed? |
Comment by Alexey Pustovalov [ 2022 Jun 23 ] |
Please try to use 4 debug level. |
Comment by Victor Sklyarov [ 2022 Jun 24 ] |
I am attaching the log. In the Windows log, the same sequence of entries. After recording the time change, there is a message about the network adapter being disconnected.
|
Comment by Victor Sklyarov [ 2022 Jun 24 ] |
[^zabbix_agentd_50433.log] WinVer 10.0.14393 |
Comment by Edgar Akhmetshin [ 2022 Jun 24 ] |
Hello Victor, Re-uploaded file with password for our DEV team, also removed clear text log with sensitive information. Confirmed. Regards, |
Comment by Vladislavs Sokurenko [ 2022 Jul 01 ] |
It should be controlled by function ServiceCtrlHandler for example ZBX-21227.diff |
Comment by Vladislavs Sokurenko [ 2022 Jul 01 ] |
Zabbix Agent should write info about received event into the log file, need to improve logs, otherwise looks like non Zabbix issue. |
Comment by Victor Sklyarov [ 2022 Jul 12 ] |
Perhaps this does not look like a zabbix problem to developers. But the fact is that the agent constantly crashes. Solving the problem - every day I run the program for detecting fallen nodes and the program for starting agents. Especially often agents fall on WINDOWS XP. For 10,000 knots, dropping 100 per day turns monitorin into a circus. What do you need to get started with this? Am I the only one with such problems? |
Comment by Vladislavs Sokurenko [ 2022 Jul 12 ] |
You could try if patch ZBX-21227.diff |
Comment by Victor Sklyarov [ 2022 Jul 22 ] |
In Windows 10, when the computer is idle for a long time, a sleep signal occurs. The procedure for switching to this mode begins and after 5-10 seconds the restoration of normal operation. In this period of time, the agent falls down. Why the sleep mode signal appears is not clear to me. Power management never turns off either the processor or the drive. |
Comment by Victor Sklyarov [ 2022 Aug 25 ] |
Please help to assembly the agent with your changes. Errors occur when attempting to build the agent. If with a key nmake /A ... Is there an updated assembly instruction for the agent? |
Comment by Vladislavs Sokurenko [ 2022 Aug 25 ] |
Something similar to this below should work: nmake -f Makefile CFLAGS="/D ZABBIX_VERSION_REVISION=ababab" RFLAGS="/d ZABBIX_VERSION_REVISION=ababab /d ZABBIX_VERSION_RC_NUM=12345" PCREINCDIR="C:\pcre-8.41-Win64\output\include" PCRELIBDIR="C:\pcre-8.41-Win64\output\lib" But here is full description: |
Comment by Victor Sklyarov [ 2022 Aug 25 ] |
D:\zabbix-release-6.0\build\win32\project>nmake /K -f Makefile_agent CFLAGS="/D ZABBIX_VERSION_REVISION=6.0.8" RFLAGS="/d ZABBIX_VERSION_REVISION=6.0.8 /d ZABBIX_VERSION_RC_NUM=1" PCREINCDIR=D:\pcre-8.45-install\include PCRELIBDIR=D:\pcre-8.45-install\lib Служебная программа обслуживания программ Microsoft (R), версия 14.33.31629.0 rc.exe /d ZABBIX_VERSION_REVISION=6.0.8 /d ZABBIX_VERSION_RC_NUM=1 /d "NDEBUG" /d "_VC80_UPGRADE=0x0600" /l 0x419 /fo"zabbix_agent.res" resource.rc resource.rc(86) : error RC2104 : undefined keyword or key name: VER_FILEDESCRIPTION_STR |
Comment by Victor Sklyarov [ 2022 Aug 25 ] |
I use VS 2022. What compiler should be used? FROM visual studio or from MingW? |
Comment by Vladislavs Sokurenko [ 2022 Aug 25 ] |
It's much better if you follow documentation and configure on linux, attached configured source |
Comment by Vladislavs Sokurenko [ 2022 Aug 25 ] |
It's visual studio, configured sources can also be downloaded here: |
Comment by Victor Sklyarov [ 2022 Aug 26 ] |
Is it possible to compile the agent for windows on linux? |
Comment by Vladislavs Sokurenko [ 2022 Aug 26 ] |
I am afraid that no, have you managed to compile on windows, it seemed that you were close. |
Comment by Victor Sklyarov [ 2022 Aug 30 ] |
Failed to compile agent Служебная программа обслуживания программ Microsoft (R), версия 14.28.29913.0 mc.exe -U -h ". algodefs.c |
Comment by Vladislavs Sokurenko [ 2022 Sep 23 ] |
Comment by Vladislavs Sokurenko [ 2022 Oct 03 ] |
Fixed in:
|
Comment by Victor Sklyarov [ 2022 Oct 17 ] |
Agent 6.0.10rc1 crashes continue. The agent writes two identical messages to the log every second "Zabbix Agent recived request:4. Agent crash is no mark in the log. The agent stopped responding and sending a request: 4". Agent 6.0.8 and 6.0.10rc1 crashes stably on Windows 10.0.18363 and 6.3 |
Comment by Vladislavs Sokurenko [ 2022 Oct 17 ] |
The event is: Can you please be so kind and provide last entries in the log |
Comment by Victor Sklyarov [ 2022 Oct 17 ] |
In what log, windows or zabbix? In zabbix log only every second "Zabbix Agent recived request:4" There are no reports of an agent crash. After the fall disappears "...request:4" |
Comment by Victor Sklyarov [ 2022 Oct 20 ] |
Your agent is ABSOLUTELY inoperable. It crashes on all versions of windows. Here is a list of versions where the fall was noticed |
Comment by Victor Sklyarov [ 2022 Oct 20 ] |
Agent 6.0.X is ABSOLUTELY inoperable! |
Comment by Vladislavs Sokurenko [ 2022 Oct 20 ] |
Please provide Zabbix agent log, having event log from windows would also be nice to have to see why Zabbix agent was stopped. |
Comment by Victor Sklyarov [ 2022 Oct 21 ] |
All Windows logs contain an event when an agent crashes: The script ip.bat defines the host address, finds addresses only from networks 10.Х.Х.Х and 172.Х.Х.Х, selects only one address. If an interface contains two or more addresses, or if there are multiple working interfaces, all but the first one in the command's ipconfig output are discarded. All host addresses are set manually. However, the downtime of the agent equals with the stop of the service DHCP |
Comment by Victor Sklyarov [ 2022 Oct 21 ] |
Unfortunately, the text ip.bat is displayed incorrectly.ip.rar |
Comment by Vladislavs Sokurenko [ 2022 Oct 21 ] |
Thanks, unfortunately missing log with debug log level, could you please be so kind and provide, it looks like something is stopping Zabbix agent, it is not stopping by itself |
Comment by Victor Sklyarov [ 2022 Oct 21 ] |
Nothing but an infinite number of performance counter reporting messages. I've already done that. There is only one message: zabbix agent stopped |
Comment by Victor Sklyarov [ 2022 Oct 25 ] |
It seems to me that the agent crash is related to the HostNameItem parameter. The fall of the agent occurs simultaneously with the fall of the dhсp service. After 30 seconds, an entry appears in the Windows log - the service did not respond to the request timely. When the dhcp service is disabled, the ipconfig request is not performed. I decided to test this hypothesis. Deleted HostNameItem and registered hostname. I'll report the results tomorrow. |
Comment by Victor Sklyarov [ 2022 Oct 26 ] |
HostNameItem has been removed by 1000 nodes. hostname=ip has been added. For 1.5 days, I do not observe falls. I change the configuration on another 9000 nodes. The result will be 31/10. What to do with |
Comment by Vladislavs Sokurenko [ 2022 Oct 26 ] |
What was the value of HostNameItem ? Does it crash if it is changed from script to something else ? We can try script locally and get back to you |
Comment by Victor Sklyarov [ 2022 Oct 26 ] |
HostnameItem=system.run["c:\zabbix\script\ip.bat"] Ther'is ip.bat in attachments The script ip.bat defines the host address, finds addresses only from networks 10.Х.Х.Х and 172.Х.Х.Х, selects only one address. |
Comment by Aleksejs Sestakovs (Inactive) [ 2022 Nov 03 ] |
Hi SVDouble , It seems that in your case Zabbix agent is stopped by some external request, probably caused by the sleep mode. This is out of our control, so the agent just stops as it should. However some time later Zabbix agent service is attempted to be started again, but fails. This is proven by your logs: Ошибка,13.10.2022 9:22:55,Service Control Manager,7000,Отсутствует,"Сбой при запуске службы ""Zabbix Agent"" из-за ошибки Служба не ответила на запрос своевременно." Ошибка,13.10.2022 9:22:55,Service Control Manager,7009,Отсутствует,"Превышение времени ожидания (30000 мс) при ожидании подключения службы ""Zabbix Agent""." Zabbix agent fails to start because your batch file cannot retrieve hostname (some network services are down at this moment). Now, when you configured 'Hostname' instead of 'HostnameItem' the agent starts without errors. Unfortunately there are no logs for the configuration errors during initialization if agent is started as service. We will try to improve logging in this aspect.
|
Comment by Victor Sklyarov [ 2022 Nov 03 ] |
It looks like the truth. You need to add in the documentation to the description of the agent configuration parameter HosnameItem - you can not use any requests to the operating system in the parameter. |
Comment by Michael Veksler [ 2023 Jan 20 ] |
Available in:
|