[ZBX-25181] SMART by zabbix-agent2: infinity loop and smart.disk.discovery request timeout Created: 2024 Sep 05  Updated: 2024 Nov 28  Resolved: 2024 Nov 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 plugin (G)
Affects Version/s: 6.4.18
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Илья Демьянов Assignee: Aigars Kadikis
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Alma Linux 8.10



 Description   

Steps to reproduce:

  1. Install and setup smartmontools 7.1 according to instruction
  2. Add template SMART by Zabbix agent 2 to a host on Zabbix server

Result:

Logs on Zabbix server:

2431821:20240905:095232.124 Zabbix agent item "smart.disk.discovery" on host "node-3-krd" failed: first network error, wait for 15 seconds                                                                       
2431821:20240905:095247.136 resuming Zabbix agent checks on host "node-3-krd": connection restored
2431821:20240905:095317.138 Zabbix agent item "smart.disk.discovery" on host "node-3-krd" failed: first network error, wait for 15 seconds                                                                       
2431821:20240905:095332.152 resuming Zabbix agent checks on host "node-3-krd": connection restored
2431821:20240905:095402.154 Zabbix agent item "smart.disk.discovery" on host "node-3-krd" failed: first network error, wait for 15 seconds 
# zabbix_get -s node-3-krd -p 10050 -k smart.disk.discovery                                                                                                                                
zabbix_get [2471880]: Timeout while executing operation

host:

# sudo -u zabbix zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf -t smart.disk.discovery                                                                                                 
smart.disk.discovery                          [m|ZBX_NOTSUPPORTED] [Timeout occurred while gathering data.]  
# journalctl -u zabbix-agent2 | tail -n 10
Sep 05 11:21:45 node-3-krd sudo[1475035]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdc -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475047]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdd -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475060]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdb -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475069]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdd -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475071]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdc -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475082]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdb -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475102]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdc -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475101]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdd -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475110]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdb -d cciss,0 -j
Sep 05 11:21:45 node-3-krd sudo[1475128]:   zabbix : PWD=/ ; USER=root ; COMMAND=/sbin/smartctl -a /dev/sdc -d cciss,0 -j

dmesg:

[Thu Sep  5 11:18:58 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:18:58 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Thu Sep  5 11:24:42 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO

Even now disable the template from the node, the spam in the log will continue indefinitely until the agent is restarted.



 Comments   
Comment by Aigars Kadikis [ 2024 Sep 11 ]

I cannot reproduce the problem since not havein a SCSI interface.

Are you sure it's related to the 7.1 version. Could you list available packages:

yum provides smartctl

If output prints data like:

smartmontools-1:6.6-3.el8.x86_64 : Tools for monitoring SMART capable hard disks
Repo        : ol8_baseos_latest
Matched from:
Filename    : /usr/sbin/smartctl

smartmontools-1:7.1-1.el8.x86_64 : Tools for monitoring SMART capable hard disks
Repo        : ol8_baseos_latest
Matched from:
Filename    : /usr/sbin/smartctl

smartmontools-1:7.1-2.el8.x86_64 : Tools for monitoring SMART capable hard disks
Repo        : ol8_baseos_latest
Matched from:
Filename    : /usr/sbin/smartctl

smartmontools-1:7.1-3.el8.x86_64 : Tools for monitoring SMART capable hard disks
Repo        : ol8_baseos_latest
Matched from:
Filename    : /usr/sbin/smartctl

Try downgrade:

dnf downgrade smartmontools-6.6

Is the agent key now stable?:

zabbix_get -s node-3-krd -p 10050 -k smart.disk.discovery
Comment by Илья Демьянов [ 2024 Sep 11 ]
# LANG=C yum provides smartctl 
Last metadata expiration check: 1:02:15 ago on Wed Sep 11 10:21:09 2024. 
smartmontools-1:7.1-3.el8.x86_64 : Tools for monitoring SMART capable hard disks 
Repo        : @System 
Matched from: 
Filename    : /usr/sbin/smartctl 

smartmontools-1:7.1-3.el8.x86_64 : Tools for monitoring SMART capable hard disks 
Repo        : baseos 
Matched from: 
Filename    : /usr/sbin/smartctl
Comment by Stanislavs Jurgensons (Inactive) [ 2024 Nov 28 ]

Duplicate of: ZBX-25395

Generated at Fri May 02 07:02:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.