Web doesnt work after update

So ok I got it. This worked for me.

I edited data owner in

/opt/librenms/storage/framework/chache/

i had owner librenms, but it must be www-data

when i edited this, than I can access my webui

This morning, two my librenms`s stop working, no devices in web-ui, and here is log:

[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: from  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: to  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: from  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: to  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: from  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: to  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: from  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: to  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: from  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: to  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: from  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:76 Undefined index: to  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/LibreNMS/Authentication/UserProxy.php:42 Undefined index: userlevel  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/LibreNMS/Authentication/UserProxy.php:42 Undefined index: userlevel  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:436 Undefined index: searchquery  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:437 Undefined index: os  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:438 Undefined index: version  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:439 Undefined index: hardware  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:440 Undefined index: features  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:441 Undefined index: location  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:443 Undefined index: state  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:444 Undefined index: disabled  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:445 Undefined index: ignore  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:446 Undefined index: group  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:453 Undefined index: searchbar  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:459 Undefined index: searchquery  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:469 Undefined index: section  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/pages/devices.inc.php:469 Undefined index: bare  
[2018-09-12 12:14:52] production.ERROR: 8 /opt/librenms/html/legacy_index.php:271 Undefined variable: no_refresh

You mean like a
chown -R YOURWEBUSER:YOURWEBGROUP /opt/librenms/storage/framework/chache/
recursively on the directory?

chown -R www-data:www-data /opt/librenms/storage/framework/cache/data

If it helps, my permissions are:

chown -R nginx:nginx /opt/librenms/storage/framework/cache/data

maybe try both

For example I dont have user nginx

My webserver user is in the librenms group, so with a

MYSERVER:/ # ls -al /opt/librenms/storage/framework
drwxrwxr-x 3 librenms librenms  4096 12. Sep 10:44 cache
(...)

it has r/w/x permissions.

I edited only folder data

total 84
drwxrwxr-x. 6 librenms librenms  4096 May 11 10:26 .
drwxrwxr-x+ 6 librenms librenms  4096 May 11 10:26 ..
drwxrwxr-x. 3 librenms librenms  4096 Sep 12 09:03 cache
drwxrwxr-x. 2 librenms librenms 36864 Sep 12 11:26 sessions
drwxrwxr-x. 2 librenms librenms  4096 May 11 10:26 testing
drwxrwxr-x. 2 librenms librenms 24576 Sep 12 09:03 views

librenms:~# ls -al /opt/librenms/storage/framework/cache/
total 16
drwxrwxr-x. 3 librenms librenms 4096 Sep 12 09:03 .
drwxrwxr-x. 6 librenms librenms 4096 May 11 10:26 ..
drwxr-xr-x. 3 www-data www-data 4096 Sep 12 09:03 data
-rw-rwxr--. 1 librenms librenms   14 May 11 10:26 .gitignore

Nope. Worked at first (with a “problem with the backend”-message on the dashboard), but after logging out the webinterface is not showing any more. Also, deleting all the cookies for the website didn’t help.

try on chrome guest window

Check to see what the librenms.log file says now, and re-run validate.php to check all tests are still ok.

if you still see permission errors in librenms.log, you might need to double check your webserver user ps aux | egrep ‘(apache|httpd|nginx)’

and make sure that /opt/librenms/storage/framework/cache/data folder is recursively owned by that user.

Nope, no luck.

Tried it in incognito mode on:

openSuSE leap (15.0)

  • FF 60.2.0esr (64-Bit)
  • Chromium 69.0.3497.81 (openSUSE Build) (64-Bit)

os X 10.13.6

  • Chrome 69.0.3497.92

All failed.

or - if you have selinux enabled, I would re- configure the contexts needed by LibreNMS Cannot access WebUI

or try with selinux turned off, check with sestatus

I think your other post with fping6 might be related to this.

'been there, done that, no use.

librenms.log still says

2018-09-12 12:28:57] production.ERROR: ErrorException: file_put_contents(/opt/librenms/storage/framework/views/150fa18cabc0b9c27bb552ef57facdf4ccd4525f.php): failed to open stream: Permission denied in /opt/librenms/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘file_put_conten…’, ‘/opt/librenms/v…’, 122, Array)
#1 /opt/librenms/vendor/lara (…)

but I’m not deep enough into Laravelle to be able to follow that (actually, I’m not in there at all).


./validate.php

Component Version
LibreNMS 1.43-50-ge8cf6bb38
DB Schema 267
PHP 7.0.31
MySQL 10.0.35-MariaDB
RRDTool 1.4.7
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
[FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(bash: /usr/sbin/fping6: Keine Berechtigung)
[FAIL] fping6 should be suid!
[FIX] chmod u+s /usr/sbin/fping6
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX] chown -R librenms:librenms /opt/librenms
Files:
/opt/librenms/rrd/.gitignore


(… don’t mind the fping6 [FAIL], I already posted something about that issue in Possible Bug in validate.php )

Actually, if the stuff, that the three of us are trying right now, is the right spot, then the [FIX]-suggestion in the last line of the validate.php-output could be the origin of the problem. 'Cause after that recursive chown-command, my webinterface didn’t work anymore.

I don’t think so. The fping6 - problem existed from the first time on I ran validate.php and tried to fix that specific problem. That was sometime back in august and I just didn’t post it so far.

you could try run php artisan cache:clear apparently you need to run this after changing permissions on the laravel cache/data directory. I saw @jozefrebjak ran this earlier on his fix

No luck on php artisan chache:clear.

If you are getting a Whoops you may be having file permissions issues. Try:

chown -R librenms:librenms /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
2 Likes

:laughing: As we say in Germany: “Two id…s, one thought.” I just stumbled upon the permission acl changes during install. Voilà, works like a charm.

But because we tried the chown -R libren... before, I’ve got to mention, that the chmod -R g+w ...-line you wrote is the essential one.

On my system I tried a

setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

just like in the Ubuntu install instructions, which did the same.