Problems accessing the webbGUI

This morning we could not access the webbgui,
image

This login page was shown, and after entering the credentials it cant load the webbpage

./validate.php

Component Version
LibreNMS 1.43-127-g54de884
DB Schema 268
PHP 7.0.32-0ubuntu0.16.04.1
MySQL 10.0.36-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.7.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[FIX] Check your poll log and see: Performance - LibreNMS Docs
Devices:
" three devices"

We have the same thing this morning, it keeps redirecting us to our old address, which no longer work. Did an update go wrong?

Hey, found what was the fault on our at least, it was in the file “.env” in /opt/librenms that had “APP_URL” still on our old address. Try changing it to the new address you have.

In our .env the APP_RUL is commented out. #APP_URL

I keep beeing redirected to https://localhost/login

This (commenting out APP_URL) fixed an infinite redirect loop for me. Thanks

But ours is already commented out.

[Wed Oct 03 11:11:42.941826 2018] [ssl:error] [pid 5972] AH02217: ssl_stapling_init_cert: can’t retrieve issuer certificate!
[Wed Oct 03 11:11:42.941838 2018] [ssl:error] [pid 5972] AH02604: Unable to configure certificate libre.site.net:443:0 for stapling

Ill redo the certificate

Nope didn’t help, Im still being redirected to localhost instead of fqdn or IP.

I just changed the APP_URL so it matche the URL i have in config.php and now my works :slight_smile:

Seeing the same problem here. Have tried every combination of commenting out or not commenting out APP_URL in .env and $config[‘base_url’] in config.php but no matter what it always redirects to https://localhost/login when trying to login. After each change of APP_URL or $config[‘base_url’], I’ve restarted httpd and php on the box but no change. Tried to clear cookies and attempted accessing through an incognito window in Chrome, again no difference. Same problem exists in Firefox and Edge browsers. Output of validate.php is below. This problem first started overnight today.

====================================
Component | Version
--------- | -------
LibreNMS  | 1.43-127-g54de884
DB Schema | 268
PHP       | 7.0.31
MySQL     | 5.5.60-MariaDB
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

This must be a bug when cron ran daily.sh

Any input from devs?

Hi

Same issue here. It looks like this patch solves the issue :

-bash-4.2$ git diff
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index b7c2def..77f2c6e 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -33,7 +33,7 @@ class AppServiceProvider extends ServiceProvider
         Log::useFiles(Config::get('log_file', base_path('logs/librenms.log')), 'error');
      
         // Set root url according to user's settings
-        \URL::forceRootUrl(\Config::get('app.url'));
+        \URL::forceRootUrl(\Config::get('base_url'));
 
         // Blade directives (Yucky because of < L5.5)
         Blade::directive('config', function ($key) {

Does it make sense ? The option is indeed “base_url” and I don’t know where this app.url comes from. In my environnement, the issue is now solved.

PipoCanaja

I have this problem too, I can’t access my web ui after last update

this change works for me.

In opt/librenms/app/Providers/AppServiceProvider.php

-        \URL::forceRootUrl(\Config::get('app.url'));
+        \URL::forceRootUrl(\Config::get('base_url'));

thanks

2 Likes

You shouldn’t need to change that. Check you don’t have APP_URL set in .env file. You should also check if your web server hostname is configured correctly.

That did the trick för me too

I didn’t have APP_URL set in .env, it was commented out. Also didn’t have base_url configurated in config.php, also commented out. The change to opt/librenms/app/Providers/AppServiceProvider.php that was recommended above fixed my issues. I have ServerName configured in my librenms.conf Apache configuration file.

Same with me here 
 There is probably something else that triggers this issue, but I have not identified which one yet @laf

did you find a solution?