Hi,
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
Regards
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 =====
APP_KEY=base64:avcZ5tv/49RZ8MeiUsRorAjshAPmeO+BcBz74YT6Mqc=
#DB_HOST=
#DB_DATABASE=
#DB_USERNAME=
#DB_PASSWORD=
#APP_URL=
INSTALL=true
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: 10.41.88.205, server: librenms.example.com , request: “GET /install/ajax/database/migrate HTTP/1.1”, upstream: “fastcgi://unix:/run/php-fpm-librenms.sock:”, host: “10.255.6.7”, referrer: “http://10.255.6.7/install/database ”
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).
Regards
Jeff Deng
system
Closed
14 January 2024 21:30
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.