Librenms.log file is growing really fast

Hi there,

I was having this issue not so long ago(Here), but somehow it got resolved by itself. Yesterday I noticed librenms was not responding so I sshd to it to find out is out of space, the librenms.log file has grown to 142gb. So I ran and validate.php with no issues.

[librenms@librenms ~]$ ./validate.php
Component | Version
--------- | -------
LibreNMS | 21.12.0
DB Schema | 2021_11_29_165436_improve_ports_search_index (229)
PHP | 7.4.6
Python | 3.6.8
MySQL | 10.5.13-MariaDB
RRDTool | 1.4.8
SNMP | 5.7.2
[OK] Composer Version: 2.2.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

the errors i see in the log file are as follows :

production.ERROR: PDOException: SQLSTATE[HY000] [2002] Permission denied in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000] [2002] Permission denied in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Next Illuminate\Database\QueryException: SQLSTATE[HY000] [2002] Permission denied (SQL: select * from config where (config_name = rrdtool_version) limit 1) in /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:703

I can connect just fine to the database, I also ran mysqlcheck librenms -p --auto-repair
in case something got broken. But still the problem persists.
I have added a crontab job to clear files larger than 5gb every 24h, but this is not a real solution to the problem. Im looking forward to any suggestions resolving this.

just a bump of the thread. The problem still persists any help will be greatly appreciated.

The issue is still ongoing, is there anyone that might have experienced the same thing in the meantime?

This is not librenms specific.
You have a permission problem somewhere, I’m guessing Selinux

I have downloaded the VM image from the website, so I have not set Selinux up nor the OS itself. I just checked and this is the output for sestatus

[librenms@librenms ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31

Is Selinux enabled by default and is it used by librenms and can I disable it if its not?


just a quick up

I would recommend you to do a clean installation following the manual installation guide. For example, a Ubuntu 20.04 LTS VM works really good and you can install lnms on it by following the manual. The process takes around 30 to 60 minutes and you will have a working setup. While the VM-image is present and probably works, I would not recommend that for production use. If you wish to have a fast deployment and do not wish to do a clean install, the Docker option is probably your best choice.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.