Hi all, I am setting up a new instance of Librenms on an OEL 8.4 server. This is a distributed setup with the following servers:
Web server running nginx
3 pollers
“storage” server running rrdcached and redis
mysql server running mysql 8.0.26
No matter what I do I cannot get the web server to connect to the database server. Output of validate.php:
[[email protected] ~]$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 21.7.0
DB Schema | Not Connected (0)
PHP | 7.3.20
Python | 3.6.8
MySQL | ?
RRDTool | 1.7.0
SNMP | NET-SNMP 5.8
====================================
[OK] Composer Version: 2.0.14
[OK] Dependencies up-to-date.
Could not connect to database, check logs/librenms.log.
i can connect to the server using mysql -u librenms -p -h db_host:
[[email protected] ~]$ mysql -u librenms -p -h cpmysqlqa9v.company.com
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 135405
i also made sure my .env file and config.php are updated with the correct server credentials:
[[email protected] ~]$ cat .env
REDIS_HOST=cplibrenmssp01
REDIS_PORT=6379
CACHE_DRIVER=redis
APP_KEY=redacted
LIBRENMS_USER=librenms
DB_HOST=cpmysqlqa9v
DB_DATABASE=librenms
DB_PORT=3306
DB_USERNAME=librenms
DB_PASSWORD=password_redacted
NODE_ID=
<?php
$config['user'] = 'librenms';
$config['auth_mechanism'] = "mysql"; # default, other options: ldap, http-auth
$config['rrd_purge'] = 0;
$config['distributed_poller'] = true;
$config['rrdcached'] = "cplibrenmssp01.company.com:42217";
$config[‘db_host’] = ‘cpmysqlqa9v.company.com’;
$config[‘db_port’] = ‘3306’;
$config[‘db_user’] = ‘librenms’;
$config[‘db_pass’] = ‘password_redacted’;
$config[‘db_name’] = ‘librenms’;
im not sure if this is a php-mysql issue, since connecting to the mysql server via the mysql CLI works fine. I have the following php packages installed:
php-common-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-cli-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-json-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-pdo-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-mbstring-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-pecl-zip-1.15.4-1.module+el8.2.0+5569+98c8b30d.x86_64
php-fpm-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-mysqlnd-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-xml-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-gd-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-process-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
php-snmp-7.3.20-1.module+el8.2.0+7784+4033621d.x86_64
connecting to the librenms web instance works to get to the login screen, but i can’t actually log in. Any login attempt tells me “Whoops! there was a problem” and to check librenms.log.
Additionally, no such log exists. I created it manually as the librenms user, but it doesn’t get written to. There is also a daily.log that is also never written to…
the librenms users’ homefolder exists on another local disk with a symlink in /opt. I don’t think that would affect this, but the devil is in the details, as they say.