Polled-wrapper.py fail

Hi,

My LibreNMS is showing some errors in ./validate.php in both the CLI and web interfaces, but they do not appear consistently. When I try to do the polling, the results indicate that it is okay.

[librenms@localhost ~]$ ./validate.php

Component Version
LibreNMS 24.5.0-11-gc7708922a (2024-05-23T08:33:51+05:30)
DB Schema 2024_04_29_183605_custom_maps_drop_background_suffix_and_background_version (294)
PHP 8.1.28
Python 3.6.8
Database MariaDB 10.3.28-MariaDB
RRDTool 1.7.0
SNMP 5.8
===========================================

[OK] Composer Version: 2.7.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[FAIL] No active polling method detected
[OK] Dispatcher Service not detected
[OK] Locks are functional
[FAIL] No active python wrapper pollers found
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
bootstrap/cache/.gitignore
html/images/librenms_logo_blue.svg
html/images/librenms_logo_dark.svg
html/images/librenms_logo_light.svg
html/images/librenms_logo_mono.svg
html/images/os/generic.svg
html/images/os/vsolution.png
logs/.gitignore
rrd/.gitignore
storage/app/.gitignore
storage/app/public/.gitignore
storage/debugbar/.gitignore
storage/framework/cache/.gitignore
storage/framework/cache/data/.gitignore
storage/framework/sessions/.gitignore
and 3 more…

The ./poller.php result is below.

[librenms@localhost ~]$ ./poller.php -h 172.168.15.228
Warning: poller.php is deprecated! Use lnms device:poll instead.>>>>

Polled CHN_SO_OLT_OFFICE_NODE2 (282) in 12.010 seconds <<<
SNMP [38/10.38s]: Snmpget[22/1.73s] Snmpwalk[16/8.65s]
SQL [113/0.36s]: Select[55/0.14s] Update[51/0.19s] Delete[4/0.02s] Insert[3/0.01s]
RRD [67/0.00s]: Update[67/0.00s]
[librenms@localhost ~]$

Also, lnms is giving proper results.

[librenms@localhost ~]$ lnms device:poll 172.168.15.228
Starting polling run:

Hostname: 172.168.15.228
ID: 282 >>>>

<<<< SNMP [38/19.40s]: Snmpget[22/2.35s] Snmpwalk[16/17.05s]
SQL [91/0.25s]: Select[53/0.14s] Update[37/0.11s] Delete[1/0.00s]
RRD [67/0.00s]: Update[67/0.00s]

When I run ./poller-wrapper.py, it is successful without any errors. The result is as follows:

[librenms@localhost ~]$ ./poller-wrapper.py 16
2024-05-23 12:36:42,245 :: INFO :: starting the poller check at 2024-05-23 12:36:42 with 16 threads for 153 devices
2024-05-23 12:37:20,033 :: WARNING :: worker Thread-24 finished device 151 in 37 seconds with exit code 0
2024-05-23 12:37:21,768 :: WARNING :: worker Thread-30 finished device 288 in 39 seconds with exit code 0
2024-05-23 12:37:23,383 :: WARNING :: worker Thread-22 finished device 279 in 41 seconds with exit code 0
2024-05-23 12:37:24,911 :: WARNING :: worker Thread-20 finished device 123 in 42 seconds with exit code 0
2024-05-23 12:37:25,487 :: WARNING :: worker Thread-28 finished device 215 in 43 seconds with exit code 0

The weirdest part is that sometimes the PHP validation can show that everything is okay.

[librenms@localhost ~]$ ./validate.php

Component Version
LibreNMS 24.5.0-11-gc7708922a (2024-05-23T08:33:51+05:30)
DB Schema 2024_04_29_183605_custom_maps_drop_background_suffix_and_background_version (294)
PHP 8.1.28
Python 3.6.8
Database MariaDB 10.3.28-MariaDB
RRDTool 1.7.0
SNMP 5.8
===========================================

[OK] Composer Version: 2.7.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
bootstrap/cache/.gitignore
html/images/librenms_logo_blue.svg
html/images/librenms_logo_dark.svg
html/images/librenms_logo_light.svg
html/images/librenms_logo_mono.svg
html/images/os/generic.svg
html/images/os/vsolution.png
logs/.gitignore
rrd/.gitignore
storage/app/.gitignore
storage/app/public/.gitignore
storage/debugbar/.gitignore
storage/framework/cache/.gitignore
storage/framework/cache/data/.gitignore
storage/framework/sessions/.gitignore
and 3 more…
[librenms@localhost ~]$

Please help me to understand this issues

I have this same issue as you. I’ve put it down that my polling is taking too long to complete as my setup is currently taking around 120~ seconds to complete and some devices get the “Polling took longer than 0.5 minutes! This will cause gaps in graphs.” but i dont have any issues with graphs or data.

I dont know how to resolve it yet.

Yes my graph also not showing any error

Out of curiosity whats your average poll time? Cog > Poller > Poller

My total poll time is around 130 and it flicks between red and green but i feel its going red due to the long time its taking. Curious if its same as you?

For some devices (up to 10), it is approximately 230, but mostly it is less than 10.