[ZBX-24796] Zabbix server 7 to agent 6.4.16 unable to retrieve system.sw.packages.get values Created: 2024 Jul 06  Updated: 2024 Jul 08  Resolved: 2024 Jul 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Server (S)
Affects Version/s: 6.4.16, 7.0.0
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Jason Assignee: Zabbix Support Team
Resolution: Fixed Votes: 0
Labels: items, server
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian 12 (amd64)



 Description   

Having some troubles with zabbix 7 server unable to retrieve system package information from an agent.
No values are returned and there are no associated logs.

Using the local agent, the values are clearly being retrieved, but when attempting from the server there are no values retrieved. Other information retrieval is functional (as shown by the hostname key returning a value).

Server:

zabbix_get -s 172.20.20.3 --tls-psk-identity mailmanager --tls-connect psk --tls-psk-file /tmp/mailpsk -k system.hostname
mail

root@nms:~# zabbix_get -s 172.20.20.3 --tls-psk-identity mailmanager --tls-connect psk --tls-psk-file /tmp/mailpsk -k system.sw.packages.get[^openssl$]
[]

root@nms:~# zabbix_get -V
zabbix_get (Zabbix) 7.0.0
Revision 49955f1fb5c 3 June 2024, compilation time: Jun  3 2024 05:55:33
Copyright (C) 2024 Zabbix SIA
License AGPLv3: GNU Affero General Public License version 3 <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.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 3.0.9 30 May 2023
Running with OpenSSL 3.0.13 30 Jan 2024

root@nms:~# zabbix_server -V
zabbix_server (Zabbix) 7.0.0
Revision 49955f1fb5c 3 June 2024, compilation time: Jun  3 2024 05:55:33
Copyright (C) 2024 Zabbix SIA
License AGPLv3: GNU Affero General Public License version 3 <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.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 3.0.9 30 May 2023
Running with OpenSSL 3.0.13 30 Jan 2024

root@nms:~# uname -a
Linux nms 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux

root@nms:~# cat /etc/*release*
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Agent:

root@mail:~# zabbix_agent2 -t system.sw.packages.get[^openssl$]
system.sw.packages.get[^openssl$]             [s|[{"name":"openssl","manager":"dpkg","version":"3.0.13-1~deb12u1","size":2349056,"arch":"amd64","buildtime":{"timestamp":0,"value":""},"installtime":{"timestamp":0,"value":""}}]]

root@mail:~# zabbix_agent2 -V
zabbix_agent2 (Zabbix) 6.4.16
Revision 0bc8c627cc0 17 June 2024, compilation time: Jun 17 2024 12:50:32, built with: go1.21.3
Plugin communication protocol version is 6.4.0
Copyright (C) 2024 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.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 3.0.9 30 May 2023
Running with OpenSSL 3.0.13 30 Jan 2024
We use the library Eclipse Paho (eclipse/paho.mqtt.golang), which is
distributed under the terms of the Eclipse Distribution License 1.0 (The 3-Clause BSD License)
available at https://www.eclipse.org/org/documents/edl-v10.php
We use the library go-modbus (goburrow/modbus), which is
distributed under the terms of the 3-Clause BSD License
available at https://github.com/goburrow/modbus/blob/master/LICENSE

root@mail:~# uname -a
Linux mail 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux

root@mail:~# cat /etc/*release*
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


 Comments   
Comment by Markku Leiniö [ 2024 Jul 07 ]

Works here (first zabbix_get tries with JSON, then with plaintext, as designed).

Please set DebugLevel=5 in the agent and post the log results of the zabbix_get attempt.

Comment by Jason [ 2024 Jul 07 ]

I upgraded the agent to 7.0 to see if that was the problem, but it still persists.

Here is the debug, something about nonexistent package database?

Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763434 received passive check request: '{"request":"passive checks","data":[{"key":"system.sw.packages.get[^openssl$]","timeout":30}]}' from '10.10.3.2'
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763524 [1] processing update request (1 requests)
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763537 [1] adding new request for key: 'system.sw.packages.get[^openssl$]'
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763544 [1] created direct exporter task for plugin 'Sw' itemid:0 key 'system.sw.packages.get[^openssl$]'
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763547 [1] created configurator task for plugin Sw
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763564 plugin Sw: executing configurator task
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.763573 executing direct exporter task for key 'system.sw.packages.get[^openssl$]'
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.765430 failed to obtain PID of dead child process: no child processes
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.772209 failed to obtain PID of dead child process: no child processes
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.774335 failed to obtain PID of dead child process: no child processes
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.779479 unexpected number of fields while expected 6 in "error: cannot open Packages database in /nonexistent/.rpmdb", ignoring
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.780718 executed direct exporter task for key 'system.sw.packages.get[[^openssl$]]'
Jul 07 09:22:51 mail zabbix_agent2[44124]: 2024/07/07 09:22:51.780758 sending passive check response: '{"version":"7.0.0","variant":2,"data":[{"value":"[]"}]}' to '10.10.3.2'

Does it think this is an RPM package based system?

Comment by Jason [ 2024 Jul 07 ]

Oh! It turns out that rpm was installed on this Debian server. Very strange, but apt remove rpm made the agent switch back to using dpkg.
Interesting to see the agent choose rpm first even with dpkg present.

Feel free to close this

Comment by Ilja Fedotjevs [ 2024 Jul 08 ]

Hi Jason, 
thanks for contacting Zabbix support. Closing ticket with your confirmation.

BR,

Zabbix support

Generated at Sat Jul 05 10:00:33 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.