[ZBX-22217] zabbix agent crashes on request from server - ubuntu 22.04 Created: 2023 Jan 18  Updated: 2024 Apr 10  Resolved: 2023 Feb 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 5.0.30
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Lorenzo Benfenati Assignee: Zabbix Development Team
Resolution: Cannot Reproduce Votes: 0
Labels: agent, crash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Agent running on vmware VM running Ubuntu 22.04, updated
Server on VM running Ubuntu 20.04, Zabbix 5.0 LTS


Attachments: File zabbix_agentd.conf     Text File zabbix_agentd.log    
Team: Team B
Sprint: Support backlog

 Description   

Steps to reproduce:

  1. Install zabbix agent following the instructions here https://www.zabbix.com/download?zabbix=5.0&os_distribution=ubuntu&os_version=22.04&components=agent&db=&ws=
  2. Edit config file (attached)
  3. add to zabbix server or launch   zabbix_get -s <hostname>  --tls-connect psk --tls-psk-identity PSK --tls-psk-file /tmp/psk -k agent.hostname

Result:

Zabbix agent crashes, on the server side the error is

zabbix_get [53569]: Get value error: TCP successful, cannot establish TLS to [[hostname]:10050]: SSL_connect() I/O error: [104] Connection reset by peer

See log file...
Expected:

working...



 Comments   
Comment by Andris Mednis [ 2023 Jan 18 ]

I downloaded
zabbix-agent_5.0.30-1+ubuntu22.04_amd64.deb
zabbix-get_5.0.30-1+ubuntu22.04_amd64.deb
from https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix/
and tried on Debian/unstable:

$ ./zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 5.0.30
Revision 2c96c38fb4b 28 November 2022, compilation time: Nov 28 2022 09:19:03

Copyright (C) 2022 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

Compiled with GnuTLS 3.7.3
Running with GnuTLS 3.7.8       <-- Debian/unstable has newer GnuTLS.

No crash observed with invalid "Server=" parameter.

$ ./zabbix_get -s 127.0.0.1 --tls-connect psk --tls-psk-identity ODOOre16 --tls-psk-file ~/ZBX-22217/zabbix_agentd.psk -k agent.hostname
zabbix_get [67160]: Check access restrictions in Zabbix agent configuration
zabbix_get [67160]: Warning: gnutls_bye() with 127.0.0.1 returned error code: -53 Error in the push function.

In zabbix_agentd.log:

 67157:20230118:191551.505 In zbx_tls_accept()
 67157:20230118:191551.506 zbx_psk_cb() requested PSK identity "ODOOre16"
 67157:20230118:191551.506 zbx_tls_accept() PSK identity: "ODOOre16"
 67157:20230118:191551.506 End of zbx_tls_accept():SUCCEED (established TLS1.2 ECDHE-PSK-AES-128-CBC-SHA256-32)
 67157:20230118:191551.506 zbx_setproctitle() title:'listener #2 [processing request]'
 67157:20230118:191551.506 failed to accept an incoming connection: connection from "127.0.0.1" rejected, allowed hosts: "172.18.60.225"

Even manually replacing system-wide GnuTLS 3.7.8 with a library GnuTLS 3.7.3 (downloaded from https://packages.ubuntu.com/jammy/amd64/libgnutls30/download) did not reproduce the crash.

Comment by Andris Mednis [ 2023 Jan 21 ]

Cannot reproduce with a fresh installation of Ubuntu 22.04 virtual machine, it does not crash.

lorenzo.benfenati, does it happen always or occasionally ? On multiple machines or only one? How long is your PSK value? (I tested with 64 bytes long PSK file). There must be some specific details leading to crash.

Generated at Fri May 09 05:33:48 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.