My polling stopped around the time I received notice that Librenms was going to require Python3.5, and I believe I had something like 3.4. Whatever I had I went to update to 3.6 and it caused a nightmare. I can connect to Mariadb via cli, I can update LibreNMS and validate.php looks OK. Python3 is version 3.6.8. Something I am missing and I can’t figure it out. When I run “/opt/librenms/librenms-service.py -v” I get no output in any log in ~librenms/log. Nothing is logged in mariadb.log or mariadb_error.log that any connection attempt is made.
I want to say I believe this was working after I had dealt with the upgrade for Python as I believe I was looking into polling performance for certain devices that I was going to disable on another server and leave running on this specific instance.
--------------------------------------------------------------------------------------------
# **mysql -u librenms2 -p******** -h localhost**
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2758
Server version: 10.0.38-MariaDB-wsrep MariaDB Server, wsrep_25.25.rc3fc46e
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> quit
Bye
# /opt/librenms/librenms-service.py -v
MainThread(INFO):Configuring LibreNMS service
MainThread(INFO):Attempting to load .env from '/opt/librenms/.env'
MainThread(INFO):Using pure python SQL client
MainThread(CRITICAL):ERROR: Could not connect to MySQL database! (1044, "Access denied for user 'librenms2'@'127.0.0.1' to database 'librenms2'")
(1044, "Access denied for user 'librenms2'@'127.0.0.1' to database 'librenms2'")
#
--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
**config.php**
### Database config
$config['db_host'] = 'localhost';
$config['db_port'] = '3306';
$config['db_user'] = 'librenms2';
$config['db_pass'] = '********';
$config['db_name'] = 'librenms2';
$config['db_socket'] = '';
--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
**.env**
DB_HOST=localhost
DB_DATABASE=librenms2
DB_USERNAME=librenms2
DB_PASSWORD=********
--------------------------------------------------------------------------------------------
====================================
Component | Version
--------- | -------
LibreNMS | 1.64.1-35-gff55be7
DB Schema | 2020_05_24_212054_poller_cluster_settings (166)
PHP | 7.2.27
Python | 3.6.8
MySQL | 10.0.38-MariaDB-wsrep
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
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
====================================
# **python3 --version**
Python 3.6.8
Finally my 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
*/5 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
* * * * * librenms /opt/librenms/alerts.php >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/poll-billing.php >> /dev/null 2>&1
01 * * * * librenms /opt/librenms/billing-calculate.php >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/services-wrapper.py 1 >> /dev/null 2>&1
# Daily maintenance script. DO NOT DISABLE!
# If you want to modify updates:
# Switch to monthly stable release: https://docs.librenms.org/General/Releases/
# Disable updates: https://docs.librenms.org/General/Updating/
15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1