[ZBX-24943] Active checks not working on new hosts until proxy restart Created: 2024 Jul 30 Updated: 2025 Apr 17 |
|
Status: | Open |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Proxy (P), Server (S) |
Affects Version/s: | 7.0.1, 7.0.2 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Francesco Lentisco | Assignee: | Michal Kudlacz |
Resolution: | Unresolved | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Description |
Steps to reproduce:
Result: Restarting proxies seem to solve the issue Tested on 7.0.1 and 7.0.2. Please let me know if you need additional info |
Comments |
Comment by Francesco Lentisco [ 2025 Mar 18 ] |
Any news on this? |
Comment by Markku Leiniö [ 2025 Mar 26 ] |
Works here with 7.0.10 components: agent2 connects to one of the proxies, gets redirected if necessary, and starts providing data. Agent availability is green and items are collecting data. ServerActive=192.168.7.81;192.168.7.82 Maybe start a discussion in Zabbix forums if more help needed with the configuration. |
Comment by Francesco Lentisco [ 2025 Mar 27 ] |
Hi markkul thanks for response I made another test this morning with a newly registered vm in my environment and the result is the same as described. Now we upgraded the infrastructure to version 7.2.4 (proxy is still 7.2.3 tough). Forgot to mention that we actually have an autoregistration action that automatically enables host and links icmp ping and zabbix agent active templates. From the logs seems like proxy "fails" to realize that the host is registered. No other data is exchanged between zabbix-agent and zabbix-proxy, aside from `host [lum01.lum.it3.ns.farm] not found` I'm uploading zabbix-proxy and zabbix-agent configuration and a small network capture from the agent perspective (unfortunately, registration part is missing). I hope it can help to debug the issue zabbix_agent2_aux.log |
Comment by Francesco Lentisco [ 2025 Mar 27 ] |
Here's a capture from the same machine AFTER I restarted both proxies in the proxy group |
Comment by Markku Leiniö [ 2025 Mar 27 ] |
So what you are showing means that proxy01 was not aware of agent named "lum01.lum.it3.ns.farm", and thus responded with failure. In that case the interesting piece of capture is the traffic between the server and the proxy: the server should tell about all agents using the proxy group so that the proxies can provide redirections as needed. I have seen before that the server "forgot" to tell the proxy about the agents, it was described in But yes, take a capture of server-proxy traffic and see that the affected agents are mentioned by the server. |
Comment by Francesco Lentisco [ 2025 Mar 27 ] |
Sure, here you go. the 3 vms tried to register after 60s and from that point onwards we can see that all active check reqs from those agents end up in failure In the end I restarted the 2 proxies at the same time and active agent checks started to work, around ~400s Here's some info Zabbix server: 10.12.13.233 You can merge both captures in one wireshark session, just checked. proxy02_npe.pcap |
Comment by Markku Leiniö [ 2025 Mar 27 ] |
In Wireshark you can see the interesting packets with a "zabbix.proxy.config and tcp.len > 200" (or similar) display filter:
= from that point on the proxies had a common view about the agents. You would need to capture already earlier (since the proxy start) to catch the prior host_proxy mappings. |
Comment by Francesco Lentisco [ 2025 Mar 27 ] |
Ok, I repeated the whole thing, here's what I did: 1. stopped mysql0[1-3] agents and deleted them from zabbix proxy01_npe_new.pcap seeing that it's likely a proxy issue, i'll paste here config of both proxies (I'm using the docker mysql version)
root|proxy01.zabbix-npe.it3.ns.farm:~# cat /etc/zabbix/zabbix_agent2.conf
PidFile=/run/zabbix/zabbix_agent2.pid
LogFile=/var/log/zabbix/zabbix_agent2.log
LogFileSize=0
Server=10.12.13.232,10.12.13.233
ServerActive=10.12.13.232;10.12.13.233
Hostname=proxy01.zabbix-npe.it3.ns.farm
HostMetadata=
Include=/etc/zabbix/zabbix_agent2.d/*.conf
ControlSocket=/tmp/agent.sock
root|proxy01.zabbix-npe.it3.ns.farm:~# cat /etc/zabbix_proxy.env
DB_SERVER_HOST=10.15.1.206
DB_SERVER_PORT=3306
MYSQL_DATABASE=zabbix_proxy
MYSQL_USER=zabbix
MYSQL_PASSWORD=REDACTED
ZBX_HOSTNAME=proxy01.zabbix-npe.it3.ns.farm
ZBX_SERVER_HOST=10.12.13.232;10.12.13.233
ZBX_CACHESIZE=256M
ZBX_HISTORYCACHESIZE=256M
ZBX_HISTORYINDEXCACHESIZE=256M
ZBX_STARTDBSYNCERS=4
ZBX_STARTDISCOVERERS=8
ZBX_STARTHTTPPOLLERS=8
ZBX_STARTLLDPROCESSORS=4
ZBX_STARTPINGERS=8
ZBX_STARTPOLLERS=8
ZBX_STARTTRAPPERS=8
root|proxy02.zabbix-npe.it3.ns.farm:~# cat /etc/zabbix/zabbix_agent2.conf
PidFile=/run/zabbix/zabbix_agent2.pid
LogFile=/var/log/zabbix/zabbix_agent2.log
LogFileSize=0
Server=10.12.13.232,10.12.13.233
ServerActive=10.12.13.232;10.12.13.233
Hostname=proxy02.zabbix-npe.it3.ns.farm
HostMetadata=
Include=/etc/zabbix/zabbix_agent2.d/*.conf
ControlSocket=/tmp/agent.sock
root|proxy02.zabbix-npe.it3.ns.farm:~# cat /etc/zabbix_proxy.env
DB_SERVER_HOST=10.15.1.207
DB_SERVER_PORT=3306
MYSQL_DATABASE=zabbix_proxy
MYSQL_USER=zabbix
MYSQL_PASSWORD=REDACTED
ZBX_HOSTNAME=proxy02.zabbix-npe.it3.ns.farm
ZBX_SERVER_HOST=10.12.13.232;10.12.13.233
ZBX_CACHESIZE=256M
ZBX_HISTORYCACHESIZE=256M
ZBX_HISTORYINDEXCACHESIZE=256M
ZBX_STARTDBSYNCERS=4
ZBX_STARTDISCOVERERS=8
ZBX_STARTHTTPPOLLERS=8
ZBX_STARTLLDPROCESSORS=4
ZBX_STARTPINGERS=8
ZBX_STARTPOLLERS=8
ZBX_STARTTRAPPERS=8
|
Comment by Markku Leiniö [ 2025 Mar 27 ] |
proxy01:
proxy02:
Both got the same information:
Meaning that before 17:49:07 UTC both proxies should respond with "not found" for any agents, but after that time both proxies should be able to take the data from the agents or to provide redirection to the correct proxy. |
Comment by Francesco Lentisco [ 2025 Mar 27 ] |
Unfortunately it was not the case I performed restart around 17:51 UTC on both proxies and then the agent started providing data. I know it's a very short timelapse but it would not have turned "active" without proxy restart Is there anything else I could do? |
Comment by Markku Leiniö [ 2025 Mar 27 ] |
I tested the autoregistration as well (still at 7.0.10):
--> It took a few seconds for proxy2 to internally understand that the agent is his agent, but it succeeded eventually. You have 7.2.3 proxies, 7.2.5 is just out, try with it as well, or with 7.0.10 or 7.0.11. Even better if you can repeat the problem with a new implementation so that Zabbix support could reproduce it as well. Increasing logging on the proxies might reveal why they don't "apply" the host_proxy configs they receive from the server, but interpreting the massive log is probably not easy. |
Comment by Markku Leiniö [ 2025 Mar 28 ] |
Also, maybe try without autoregistration: create the host(s) manually, does that change the behavior. My autoregistration rule I used when testing:
|
Comment by Francesco Lentisco [ 2025 Mar 28 ] |
Hello, today I updated my zabbix-infrastructure to version 7.2.5, including proxy. Unfortunately issue remains. I set DebugLevel to 4 on proxies and repeated the test while capturing proxy traffic on port 10051 Here's the timeline: 1. 1743158312 started capture and logging proxy01_20250328_1.pcap |
Comment by Francesco Lentisco [ 2025 Apr 17 ] |
Sorry to resume this thread but I'm still having this issue and haven't figured out yet if it's a bug or a misconfiguration
I found some interesting lines in the verbose log above.. I think it could be useful to figure it out Here's a fragment from proxy01 on first registration Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 trapper got '{"request":"active checks","host":"mysql01.francesco.lentisco.it3.ns.farm","version":"7.0.11","variant":2,"session":"dbbc237f5ef2178d3a5d0c6525470e53","config_revision":0}' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 In send_list_of_active_checks_json() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 In zbx_is_ip4() ip:'10.15.160.129' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 End of zbx_is_ip4():SUCCEED Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 In get_hostid_by_host_or_autoregister() host:'mysql01.francesco.lentisco.it3.ns.farm' metadata:'' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 zbx_setproctitle() title:'trapper #8 [processing data]' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 In zbx_ipc_async_socket_recv() timeout:0 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 End of zbx_ipc_async_socket_recv():0 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 trapper got '{"request":"active checks","host":"mysql03.francesco.lentisco.it3.ns.farm","version":"7.0.11","variant":2,"session":"4f5f1aa0ed02a212a0cea1be46d004a2","config_revision":0}' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 In send_list_of_active_checks_json() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 In zbx_is_ip4() ip:'10.15.169.66' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 End of zbx_is_ip4():SUCCEED Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 In get_hostid_by_host_or_autoregister() host:'mysql03.francesco.lentisco.it3.ns.farm' metadata:'' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 In zbx_pb_autoreg_write_host() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 In dbconn_get_cached_nextid() table:'proxy_autoreg_host' num:1 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.001 query [txnlev:0] [select max(id) from proxy_autoreg_host where id between 0 and 9223372036854775807] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 In zbx_pb_autoreg_write_host() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.001 In dbconn_get_cached_nextid() table:'proxy_autoreg_host' num:1 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 zbx_setproctitle() title:'trapper #3 [processing data]' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 In zbx_ipc_async_socket_recv() timeout:0 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 End of zbx_ipc_async_socket_recv():0 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 trapper got '{"request":"active checks","host":"mysql02.francesco.lentisco.it3.ns.farm","version":"7.0.11","variant":2,"session":"edbd9fd4ba72276c2d0ce3afdbac1527","config_revision":0}' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 In send_list_of_active_checks_json() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 In zbx_is_ip4() ip:'10.15.168.87' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 End of zbx_is_ip4():SUCCEED Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 In get_hostid_by_host_or_autoregister() host:'mysql02.francesco.lentisco.it3.ns.farm' metadata:'' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 In zbx_pb_autoreg_write_host() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.002 In dbconn_get_cached_nextid() table:'proxy_autoreg_host' num:1 Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.005 End of dbconn_get_cached_nextid() table:'proxy_autoreg_host' [23322:23322] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.005 query [txnlev:1] [begin;] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.005 End of dbconn_get_cached_nextid() table:'proxy_autoreg_host' [23323:23323] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.005 End of dbconn_get_cached_nextid() table:'proxy_autoreg_host' [23324:23324] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.005 query [txnlev:1] [begin;] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.005 query [txnlev:1] [begin;] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.005 query [txnlev:1] [insert into proxy_autoreg_host (id,host,listen_ip,listen_dns,listen_port,tls_accepted,host_metadata,flags,clock) values (23322,'mysql01.francesco.lentisco.it3.ns.farm','10.15.160.129','',10050,1,'',0,1743158375);.] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.005 query [txnlev:1] [insert into proxy_autoreg_host (id,host,listen_ip,listen_dns,listen_port,tls_accepted,host_metadata,flags,clock) values (23323,'mysql03.francesco.lentisco.it3.ns.farm','10.15.169.66','',10050,1,'',0,1743158375);.] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.006 query [txnlev:1] [insert into proxy_autoreg_host (id,host,listen_ip,listen_dns,listen_port,tls_accepted,host_metadata,flags,clock) values (23324,'mysql02.francesco.lentisco.it3.ns.farm','10.15.168.87','',10050,1,'',0,1743158375);.] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.006 query [txnlev:1] [commit;] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.006 query [txnlev:1] [commit;] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.006 query [txnlev:1] [commit;] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.007 End of zbx_pb_autoreg_write_host() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.007 End of get_hostid_by_host_or_autoregister():FAIL Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.007 cannot send list of active checks to "10.15.169.66": host [mysql03.francesco.lentisco.it3.ns.farm] not found Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.007 send_list_of_active_checks_json() sending [{"response":"failed","info":"host [mysql03.francesco.lentisco.it3.ns.farm] not found"}] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.007 End of send_list_of_active_checks_json():SUCCEED Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 33:20250328:103935.007 zbx_setproctitle() title:'trapper #8 [processed data in 0.005636 sec, waiting for connection]' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.007 End of zbx_pb_autoreg_write_host() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.007 End of get_hostid_by_host_or_autoregister():FAIL Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.007 cannot send list of active checks to "10.15.168.87": host [mysql02.francesco.lentisco.it3.ns.farm] not found Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.007 send_list_of_active_checks_json() sending [{"response":"failed","info":"host [mysql02.francesco.lentisco.it3.ns.farm] not found"}] Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.007 End of send_list_of_active_checks_json():SUCCEED Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 28:20250328:103935.007 zbx_setproctitle() title:'trapper #3 [processed data in 0.004998 sec, waiting for connection]' Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.007 End of zbx_pb_autoreg_write_host() Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.007 End of get_hostid_by_host_or_autoregister():FAIL Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.007 cannot send list of active checks to "10.15.160.129": host [mysql01.francesco.lentisco.it3.ns.farm] not found Mar 28 10:39:35 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 30:20250328:103935.007 send_list_of_active_checks_json() sending [{"response":"failed","info":"host [mysql01.francesco.lentisco.it3.ns.farm] not found"}] As we can see, proxy succesfully manages to save the hosts in the proxy_autoreg_host table but there seems to be some issue in the `get_hostid_by_host_or_autoregister` function as it returns a FAILURE. Then, after some time we can see that proxy receives from server a "hostmap_revision" and performs some updates on host_proxy table (host 1 and 2 are assigned to proxy 1). Even from this point onwards, function `get_hostid_by_host_or_autoregister` continue to fail. Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 Received [{"data":{"proxy":{"fields":["proxyid","name","local_address","local_port"],"data":[[5,"proxy01.zabbix-npe.it3.ns.farm","10.15.1.201","10051"],[6,"proxy02.zabbix-npe.it3.ns.farm","10.15.1.202","10051"]]},"host_proxy":{"fields":["hostproxyid","host","proxyid","revision","tls_accept","tls_issuer","tls_subject","tls_psk_identity","tls_psk"],"data":[[1822,"mysql01.francesco.lentisco.it3.ns.farm",5,64320,1,"","","",""],[1821,"mysql03.francesco.lentisco.it3.ns.farm",6,64320,1,"","","",""],[1823,"mysql02.francesco.lentisco.it3.ns.farm",5,64320,1,"","","",""]]}},"proxy_group":{"hostmap_revision":64320,"failover_delay":"20s"},"config_revision":453}] from server Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 End of zbx_get_data_from_server():SUCCEED Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 In zbx_proxyconfig_process() Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 received configuration data from server at "10.12.13.232", datalen 646 Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 query [txnlev:1] [begin;] Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 In proxyconfig_sync_data() Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 End of proxyconfig_sync_data() Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.318 query [txnlev:1] [select hostproxyid,host,proxyid,revision,tls_accept,tls_issuer,tls_subject,tls_psk_identity,tls_psk from host_proxy where hostproxyid in (1821,1822,1823) order by hostproxyid] Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.319 query [txnlev:1] [select proxyid,name,local_address,local_port from proxy order by proxyid] Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.320 query [txnlev:1] [insert into host_proxy (hostproxyid,host,proxyid,revision,tls_accept,tls_issuer,tls_subject,tls_psk_identity,tls_psk) values (1821,'mysql03.francesco.lentisco.it3.ns.farm',null,64320,1,'','','',''),(1822,'mysql01.francesco.lentisco.it3.ns.farm',null,64320,1,'','','',''),(1823,'mysql02.francesco.lentisco.it3.ns.farm',null,64320,1,'','','','');.] Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.320 query [txnlev:1] [update host_proxy set proxyid=6 where hostproxyid=1821;.update host_proxy set proxyid=5 where hostproxyid=1822;.update host_proxy set proxyid=5 where hostproxyid=1823;.] Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.321 query [txnlev:1] [commit;] Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.321 End of zbx_proxyconfig_process() Mar 28 10:39:47 proxy01.zabbix-npe.it3.ns.farm docker[1721026]: 25:20250328:103947.321 In zbx_dc_sync_configuration() Then after restart we have this: Looks like another insert in the proxy_autoreg_host is performed, with another id (I don't know if this is ok, since it's the same host) Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.004 trapper got '{"request":"active checks","host":"mysql01.francesco.lentisco.it3.ns.farm","version":"7.0.11","variant":2,"session":"dbbc237f5ef2178d3a5d0c6525470e53","config_revision":0}' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.004 In send_list_of_active_checks_json() Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.004 In zbx_is_ip4() ip:'10.15.160.129' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.004 End of zbx_is_ip4():SUCCEED Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.004 In get_hostid_by_host_or_autoregister() host:'mysql01.francesco.lentisco.it3.ns.farm' metadata:'' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.005 In zbx_pb_autoreg_write_host() Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.005 In dbconn_get_cached_nextid() table:'proxy_autoreg_host' num:1 Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.005 query [txnlev:0] [select max(id) from proxy_autoreg_host where id between 0 and 9223372036854775807] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.006 zbx_setproctitle() title:'trapper #5 [processing data]' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.006 In zbx_ipc_async_socket_recv() timeout:0 Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.006 End of zbx_ipc_async_socket_recv():0 Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.006 trapper got '{"request":"active checks","host":"mysql02.francesco.lentisco.it3.ns.farm","version":"7.0.11","variant":2,"session":"edbd9fd4ba72276c2d0ce3afdbac1527","config_revision":0}' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.006 In send_list_of_active_checks_json() Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 In zbx_is_ip4() ip:'10.15.168.87' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 End of zbx_is_ip4():SUCCEED Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 In get_hostid_by_host_or_autoregister() host:'mysql02.francesco.lentisco.it3.ns.farm' metadata:'' Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.007 End of dbconn_get_cached_nextid() table:'proxy_autoreg_host' [23325:23325] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 In zbx_pb_autoreg_write_host() Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 In dbconn_get_cached_nextid() table:'proxy_autoreg_host' num:1 Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 End of dbconn_get_cached_nextid() table:'proxy_autoreg_host' [23326:23326] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.007 query [txnlev:1] [begin;] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.007 query [txnlev:1] [begin;] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.007 query [txnlev:1] [insert into proxy_autoreg_host (id,host,listen_ip,listen_dns,listen_port,tls_accepted,host_metadata,flags,clock) values (23325,'mysql01.francesco.lentisco.it3.ns.farm','10.15.160.129','',10050,1,'',0,1743158440);.] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.008 query [txnlev:1] [insert into proxy_autoreg_host (id,host,listen_ip,listen_dns,listen_port,tls_accepted,host_metadata,flags,clock) values (23326,'mysql02.francesco.lentisco.it3.ns.farm','10.15.168.87','',10050,1,'',0,1743158440);.] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.008 query [txnlev:1] [commit;] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 30:20250328:104040.009 query [txnlev:1] [commit;] Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.009 End of zbx_pb_autoreg_write_host() Mar 28 10:40:40 proxy01.zabbix-npe.it3.ns.farm docker[1721353]: 32:20250328:104040.009 End of get_hostid_by_host_or_autoregister():SUCCEED At this point the only think I can think of is some issue with the get_hostid_by_host_or_autoregister function.. I also have some doubt about proxy db: since the dockerized image gets shipped by default with an embedded sqlite or mysql, I assumed that each proxy should have it's own dedicated database to ensure high availability. Is that correct? In my environment deployment, each proxy has it's own dedicated mysql database. |