Scheduled polling stoped

====================================

Component Version
LibreNMS 1.64.1-26-g3006453
DB Schema 2020_05_24_212054_poller_cluster_settings (166)
PHP 7.2.31
Python 3.6.8
MySQL 5.5.65-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Composer Version: 1.10.7
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

./poller.php -h all.
runs without error

-bash-4.2$ cat /etc/cron.d/librenms
33 */6 * * * librenms /opt/librenms/cronic /opt/librenms/discovery-wrapper.py 1
/5 * * * * librenms /opt/librenms/discovery.php -h new >> /dev/null 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
.
* * * * librenms /opt/librenms/alerts.php >> /dev/null 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * librenms /opt/librenms/poll-billing.php >> /dev/null 2>&1
01 * * * * librenms /opt/librenms/billing-calculate.php >> /dev/null 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1
15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1

Running /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16 cron job manualy from webmin:

Cronic detected failure or error output for the command:
/opt/librenms/poller-wrapper.py 16

RESULT CODE: 1

ERROR OUTPUT:
Traceback (most recent call last):
File “/opt/librenms/poller-wrapper.py”, line 181, in
config = json.loads(LNMS.get_config_data(install_dir))
File “/usr/lib64/python3.6/json/init.py”, line 354, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python3.6/json/decoder.py”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib64/python3.6/json/decoder.py”, line 357, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

STANDARD OUTPUT:
Cannot create logfile. Trying to obtain temporary log file.
Message: [Errno 2] No such file or directory: ‘/usr/libexec/webmin/cron/logs/poller_wrapper.log’
Trying temporary log file in /tmp/LibreNMS.library.log
[Errno 2] No such file or directory: ‘/usr/libexec/webmin/cron/logs/poller_wrapper.log’
Using [/tmp/LibreNMS.library.log]
2020-06-08 22:48:02,818 :: WARNING :: Failed to use log file [logs/poller_wrapper.log], [Errno 2] No such file or directory: ‘/usr/libexec/webmin/cron/logs/poller_wrapper.log’
Using [/tmp/LibreNMS.library.log].

Running /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16 cron job manualy from cli:

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!

ERROR: (2003, “Can’t connect to MySQL server on ‘localhost’ ([Errno 111] Connection refused)”)

Hi,

You have two options:

  1. Configure mysql socket like in here Poller Not Running from Cron

  2. Change db_host in config.php and DB_HOST in .env to point 127.0.0.1 instead localhost. You will also need to change de librenms sql user from ‘librenms’@‘localhost’ to ‘librenms’@‘127.0.0.1’

Thank you TheGreeatDoc! It helped. Everything is working now!