I have been having trouble with performance with having all services on one server. I decided to move my database to its own server. There are two lines of code that are in my .env file that I have removed because it breaks the connection to the database:
DB_PORT=3306
DB_SOCKET=/run/mysqld/mysqld.sock
After removal, Librenms is functioning. In the evening though or manually, if if daily.sh runs, it adds the above two lines into the file. The file is not replaced because if I comment out the two lines, they are added back. That leads me to two questions.
Is this by design that this happens and where does it come from?
If the above values are needed to operate, does it need to be added to the external database server or does the value just need to be changed and where?
===========================================
Component | Version |
---|---|
LibreNMS | 24.3.0-5-g6b2be73a3 (2024-04-02T07:06:25-05:00) |
DB Schema | 2021_02_09_122930_migrate_to_utf8mb4 (290) |
PHP | 8.1.2-1ubuntu2.14 |
Python | 3.10.12 |
Database | MariaDB 11.3.2-MariaDB-1:11.3.2+maria~deb12 |
RRDTool | 1.7.2 |
SNMP | 5.9.1 |
=========================================== |
[OK] Composer Version: 2.7.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
[WARN] Your install is over 24 hours out of date, last update: Tue, 02 Apr 2024 12:06:25 +0000
[FIX]:
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
This is the daily.sh results:
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema FAIL
In Connection.php line 829:
SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: update cache_locks
set owner
= OByBwRFqTQfUmtGM, expiration
= 1712176354 where key
= l
aravel_cache_framework/command-migrate and (owner
= OByBwRFqTQfUmtGM or expiration
<= 1712172754))
In Connector.php line 65:
SQLSTATE[HY000] [2002] No such file or directory
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
After this, I have to remove the two lines and everything begins to function.
Thanks