[ZBX-25236] Agent2 - MQTT timeout while subscribing Created: 2024 Sep 16 Updated: 2025 Feb 17 Resolved: 2025 Feb 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G) |
Affects Version/s: | 7.0.2, 7.0.3 |
Fix Version/s: | 6.0.39rc1, 7.0.10rc1, 7.2.4rc1, 7.4.0alpha1 |
Type: | Problem report | Priority: | Trivial |
Reporter: | Timo Hein | Assignee: | Stanislavs Jurgensons |
Resolution: | Fixed | Votes: | 2 |
Labels: | agent, items, performance | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 12, Zabbix 7.0.3, Mosquitto 2.011, Zabbix Agent 2 7.0.3 |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Team: | |
Sprint: | Support backlog |
Story Points: | 4 |
Description |
Issue already posted in the zabbix forum: https://www.zabbix.com/forum/zabbix-help/489802-agent2-mqtt-plugin-issue-time-out-while-subscribing Steps to reproduce:
See template file... Result: Remarks: The issue exists also in lower versions. There the amount of items per host, before having this issue, is much higher (approx. 1000).
|
Comments |
Comment by Kamil Florowski (Inactive) [ 2024 Sep 23 ] |
Hi, Since I was not able to reproduce it, could you provide more precise details regarding your config (hosts, items). Also couple of questions to clarify:
|
Comment by Timo Hein [ 2024 Sep 23 ] |
-> the only messages I found was something like this, but I can issue another test if you want
-> Yes, I tried this, but it seems, that it has no effect or the timeout which is max. 30 seconds is not high enough.
-> It happens right after the start of the agent. -> From 1 to some 100 -> it seems, that if you have more than 5 or in lower versions 7 hosts, the number of topics is no longer relevant
-> I tried to extract the data like $.["InterfaceOrder.Interface.WMS.IndexEnd.PLCSetpoint"].['value'] but this doesn't work |
Comment by Kamil Florowski (Inactive) [ 2024 Sep 23 ] |
Could you try to capture more detailed logs with setting the DebugLevel to 5. You can try checking that both on agent and server side. Thanks |
Comment by Timo Hein [ 2024 Sep 24 ] |
Hello, I found this in the agent2.log: 2024/09/24 07:53:47.528091 [MQTT] cannot subscribe topic 'VSW02/#' to [tcp://10.83.170.106:1883]: timed out while subscribing and this in server.log 1033:20240924:075348.312 zbx_substitute_functions_results() expression[0]:'{33577}=1' => 'ERROR(Cannot evaluate function last(/VSW02/InterfaceStatus.Interface.EmergencyStop,#1): item is not supported.)=1'
I attached the files as zip.
|
Comment by Kamil Florowski (Inactive) [ 2024 Sep 26 ] |
Hi, could you please provide the output of nc -zv 10.83.170.106 1883 from the agent where you are getting the error logs. |
Comment by Timo Hein [ 2024 Sep 26 ] |
Hi, The output of "nc -zv 10.83.170.106 1883" is pa@ZabbixTest:/var/log/zabbix$ nc -zv 10.83.170.106 1883 |
Comment by Kamil Florowski (Inactive) [ 2024 Sep 27 ] |
We have tried to reproduce the issue, but with no succes, could you please provide more details on how to reproduce it? |
Comment by Timo Hein [ 2024 Sep 27 ] |
Would it help you if I send you the configuration files from the server, the agent and an export of the hosts of my system? |
Comment by Kamil Florowski (Inactive) [ 2024 Sep 27 ] |
That might be helpful |
Comment by Timo Hein [ 2024 Sep 27 ] |
I uploaded the files. Just for information: The issue mostly appears when you restart the agent2 or reboot the system where the agent2 runs on. What I observed is, if you add one host after another into Zabbix the issue does not appear. But as soon as you do what I mentioned above it will show up. |
Comment by Kamil Florowski (Inactive) [ 2024 Sep 30 ] |
Hi, Still unable to reproduce, could you provide the steps to reproduce on clean Zabbix instance with minimum hosts/templates involved (since you mention that the broker can be on the same system, I would like to see the error in this scenario)? Some additional questions:
|
Comment by Timo Hein [ 2024 Sep 30 ] |
Hi, I indeed had the issue also on a fresh installed system. Nevertheless I will prepare a separate clean installed test system for this. I will try to install Zabbix, NodeRed and Mosquitto on the same VM. I'll keep you informed when I'm ready.
|
Comment by Kamil Florowski (Inactive) [ 2024 Sep 30 ] |
Thanks, I will wait for your follow-up message. Regarding your question, no it should not be needed so you can remove them form agent config. |
Comment by Timo Hein [ 2024 Oct 01 ] |
Hello, here are my test results:
Test1 - New Testsystem (clean install) 10 Hosts with 2 items Result=OK Test2 - Old Testsystem (Updated to 7.0.4) Same hosts as before Result=NOK Test3 - New Testsystem 10 Hosts with 2 items Result=NOK --------- It seems that if the MQTT-Plugin needs to work outside its host (over network) it has problems with the communication. I changed the Mosquitto config so that there is no difference. But this didn't help. |
Comment by Kamil Florowski (Inactive) [ 2024 Oct 08 ] |
I followed the above steps but still could not reproduce it. Could you capture the traffic from/to mqtt broker: You might want to also execute the below to check if packets are dropped, delayed at the point of timeouts: LC_ALL=C ping -s 1400 -c 100 -i 0.01 <broker_ip> |
Comment by Timo Hein [ 2024 Oct 14 ] |
Sorry for the late answer. I was out of office last week. I've put the files you requested. During the recording of the pcap-file I restarted the agent. |
Comment by Timo Hein [ 2024 Oct 24 ] |
Today I tested the 7.0.5 version and I had the same issue. Zabbix Server 7.0.5
|
Comment by Timo Hein [ 2024 Nov 05 ] |
Hello, Do you have any news? May I do something so that you can better reproduce the problem? Thanks |
Comment by Timo Hein [ 2024 Nov 12 ] |
Hello, from the Zabbix-Forum I received that hint. It seems to be a known issue. Please consider to fix it. |
Comment by Christian Westebbe [ 2024 Dec 10 ] |
Hello, is there any progress on this one? We started using mqtt.get This is a perfect way for us. But we have exactly the same porblems (timed out while subscribing/inalid update interval) Our Setup:
Thanks in advance! Christian |
Comment by Stanislavs Jurgensons [ 2025 Feb 10 ] |
Fixed in:
|