Hi LibreGurus!
My libreNMS setup stopped to work tonight.
I get database connection error but database is working fine.
librenms@sea0020sas18:~$ php validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 1.54-16-g01a519ef2
DB Schema | Not Connected (0)
PHP | 7.2.19-0ubuntu0.18.04.1
MySQL | ?
RRDTool | 1.7.0
SNMP | NET-SNMP 5.7.3
====================================
[OK] Composer Version: 1.9.0
[OK] Dependencies up-to-date.
Could not connect to database, check logs/librenms.log.
Here is log of troubleshooting.
https://p.libren.ms/view/404f9b83
I get this error message in my logs/librenms.log
> [2019-08-06 09:11:16] production.ERROR: SQLSTATE[HY000] [1045] Access denied for user 'librenms'@'localhost' (using password: YES) (SQL: select
user_idfrom
userswhere (
auth_type= http-auth or
auth_typeis null or
auth_type= ) and
username= myusername limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'librenms'@'localhost' (using password: YES) (SQL: select
user_idfrom
userswhere (
auth_type= http-auth or
auth_typeis null or
auth_type= ) and
username= myusername limit 1) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, Doctrine\\DBAL\\Driver\\PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'librenms'@'localhost' (using password: YES) at /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31, PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'librenms'@'localhost' (using password: YES) at /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27)
Ex. I can list the userids fine with info from config.php:
librenms@sea0020sas18:~$ echo ‘select user_id
from users
;’ | mysql -u librenms --password=sed -ne "/db_pass/{s/';$//;s/.*'//;p}" config.php
librenms
user_id
1
4
7
10
5
2
3
11
12
8
9
6
Does anyone know what could have caused this?