Install a new Librenms - DB Schema and Database Not Connected


I am installing Librenms onto a new Azure server. WebUI Installer stuck at Build Database. When I run ./validate.php, it shows:

librenms@Server:~$ ./validate.php

Component Version
LibreNMS 23.9.1-70-ga6239a733 (2023-10-09T13:00:05+13:00)
DB Schema Not Connected (0)
PHP 8.1.2-1ubuntu2.14
Python 3.10.12
Database Not Connected
RRDTool 1.7.2
SNMP 5.9.1

[OK] Composer Version: 2.6.5
[OK] Dependencies up-to-date.
Could not connect to database, check logs/librenms.log.

Please give me an advice. Thank you


Jeff Deng

Librenms logs:
Next Illuminate\Database\QueryException: SQLSTATE[HY000] [1045] Access denied for user ‘librenms’@‘localhost’ (using password: NO) (Connection: mysql, SQL: select * from config where (config_name = snmp.unescape) limit 1) in /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:795
Stack trace:
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(755): Illuminate\Database\Connection->runQueryCallback()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(424): Illuminate\Database\Connection->run()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2748): Illuminate\Database\Connection->select()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2736): Illuminate\Database\Query\Builder->runSelect()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3290): Illuminate\Database\Query\Builder->Illuminate\Database\Query{closure}()

Your database credentials seem to be incorrect. You can change them in /opt/librenms/.env (or delete it and run the web installer again)

Hi Murrant,

Thanks, my DB was on “#”. I tried both ways edit and delete the .env file. But it is still not working.

I have done Ubuntu (v22.04) CIS compliance (cis leve1 server). Do you think this issue relates to the CIS compliance?

====== .env file =====


I think this causes my web installation stuck on build database. Can some one give me an advice please? thank you.

Nginx error logs:

2023/10/11 21:37:18 [error] 213004#213004: *127 upstream timed out (110: Unknown error) while reading upstream, client:, server:, request: “GET /install/ajax/database/migrate HTTP/1.1”, upstream: “fastcgi://unix:/run/php-fpm-librenms.sock:”, host: “”, referrer: “

Your web server is cutting off the database build with a timeout.
Either increase the timeout, increase the performance of your database server, or build the database manually with lnms migrate after adding db credentials to .env (you’ll have to create an admin user too)

I think the docs cover the manual process to avoid the web install.

Thank you murrant. Librenms is working fine if I don’t run the Ubuntu CIS compliance script (cis leve1 server).


Jeff Deng

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