My LibreNMS instance was just fine. But today I found out that something happened to poller - it does not pull devices anymore. I got stuck in troublshooting
- I looked at cron job logs - poller wrapper runs every 5 min as expected.
- However if I run cron job manually i.e. [./cronic /opt/librenms/poller-wrapper.py 16] I recevie error - can’t connect to database: RESULT CODE: 2; STANDARD OUTPUT: ERROR: Could not connect to MySQL database!
- If I run poller manually - no problems.
- I have only about 50 devices so polling finishes in less than 200 seconds.
- I have not touched my instance for month - so no changes has been made (with exception to automatic updates)that could cause this issue
I don’t understand why poller-wrapper.py reports db connection error?
[root@librenms librenms]# ./validate.php
Component | Version |
---|---|
LibreNMS | 1.32-53-gee5c223 |
DB Schema | 211 |
PHP | 7.0.20 |
MySQL | 5.5.52-MariaDB |
RRDTool | 1.4.8 |
SNMP | NET-SNMP 5.7.2 |
====================================
[OK] Database connection successful
[OK] Database schema correct
[FAIL] The poller has not run in the last 5 minutes, check the cron job
[WARN] Some devices have not been polled in the last 5 minutes.
########################################################################
[root@librenms librenms]# ./cronic /opt/librenms/poller-wrapper.py 16
Cronic detected failure or error output for the command:
/opt/librenms/poller-wrapper.py 16
RESULT CODE: 2
ERROR OUTPUT:
STANDARD OUTPUT:
ERROR: Could not connect to MySQL database!
[root@librenms librenms]#
#######################################################
[root@librenms librenms]# ./poller.php -h 6
LibreNMS Poller
Starting polling run:
Hostname: sje014-qa-3750g.illumio.net
Device ID: 6
OS: ios (cisco)
Uptime: 357 days, 6h 50m 36s
Module [ unix-agent ] disabled globally.
#######################################################