librenms / docker

LibreNMS Docker image
MIT License
691 stars 278 forks source link

Weathermap plugin breaks LibreNMS 22.7.0 #296

Closed marcogiorgio closed 2 years ago

marcogiorgio commented 2 years ago

Behaviour

Steps to reproduce this issue

  1. Update LibreNMS to 22.7.0
  2. Launch Web UI

Expected behaviour

WebUI gets to login page

Actual behaviour

Whoops, something went wrong, Check your librenms.log

Configuration

Hi, today I upgraded LibreNMS to the latest version (22.7.0) using docker compose, but after the update, the homepage says: "Whoops, something went wrong, Check your librenms.log". I reverted back to 22.6.0 and LibreNMS started working normally. Has anyone encountered the same problem?

Error log:

[2022-07-25T16:00:45.775948+02:00] production.ERROR: ksort(): Argument 1 ($array) must be of type array, null given (View: /opt/librenms/resources/views/layouts/librenmsv1.blade.p [previous exception] [object] (Illuminate\View\ViewException(code: 0): ksort(): Argument 1 ($array) must be of type array, null given (View: /opt/librenms/resources/views/layout [previous exception] [object] (TypeError(code: 0): ksort(): Argument 1 ($array) must be of type array, null given at /opt/librenms/html/plugins/Weathermap/lib/editor.inc.php:168)"

marcogiorgio commented 2 years ago

The issue has been reported here by another user: LibreNMS forum. Probably it's a general LibreNMS issue, in that case feel free to close this post. Thanks

murrant commented 2 years ago

Weathermap does (not LibreNMS) seem to have an issue on PHP 8. Will need to get it fixed there: https://github.com/librenms-plugins/Weathermap

marcogiorgio commented 2 years ago

Thanks for your reply. In fact I tried to set ENABLE_WEATHERMAP=false, but it wasn't enough. I'll wait for a fix. Thanks

librenms-bot commented 2 years ago

This issue has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/production-error-ksort-argument-1-array-must-be-of-type-array/19236/2

Laplacence commented 2 years ago

at 22.6.0 disable the weathermap plugin, then it work fine at 22.7.0 :D

marcogiorgio commented 2 years ago

at 22.6.0 disable the weathermap plugin, then it work fine at 22.7.0 :D

Disabling the plugin in WebUI did the trick. Thanks for the workaround

ryanmerolle commented 2 years ago

interesting weathermap is already disabled in the UI for me, but still is causing issues when I switch to 22.7.0

mkidle commented 2 years ago

This issue is encountered only if there are NO configuration files in the weathermap configs directory. Even an empty file works fine. This gives you GUI access to disable the plugin, as you are obviously not using it. Users that already are using Weathermap are naturally not affected by this bug.

Example workaround in shell: sudo su - librenms touch /opt/librenms/html/plugins/Weathermap/configs/dummy.conf exit

crazy-max commented 2 years ago

@murrant https://github.com/librenms-plugins/Weathermap/pull/79 might fix issue with Weathermap and PHP 8 so we could bring it back in the Docker image.