PHP exceptions and broken graphs

Good morning and wish a good month.

I have the following problem running validate.php from terminal and i believe it is part of a bigger problem in all LibreNMS WebUI.
I see several PHP errors in many sub-pages in the WebUI and whatever i tryed i haven’t figure it out.

I am using Librenms with Ubuntu 22.04 latest update in both OS and Application and navigating through Firefox 110.0(64bit).

  1. From Services Page:

“Exception: Undefined variable $stype”
“/opt/librenms/includes/html/modal/new_service.inc.php:23”
Services »
“Exception: Undefined array key “view””
“/opt/librenms/includes/html/pages/services.inc.php:34”
“Exception: Undefined array key “state””
“/opt/librenms/includes/html/pages/services.inc.php:45”
“Exception: Undefined variable $where”
“/opt/librenms/includes/html/pages/services.inc.php:150”

2)From Validate.php
librenms@librenms:~$ ./validate.php

Component Version
LibreNMS 23.2.0-7-gdda317613 (2023-03-01T02:10:45+02:00)
DB Schema 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP 8.1.2-1ubuntu2.10
Python 3.10.6
Database MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.5.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service is enabled
[OK] Locks are functional
[OK] No active python wrapper pollers found
[WARN] Using database for locking, you should set CACHE_DRIVER=redis
[OK] rrdtool version ok
[OK] Connected to rrdcached
“Exception: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated”
“/opt/librenms/LibreNMS/Validations/User.php:95”

I see the exact same thing.

===========================================

Component Version
LibreNMS 23.2.0-31-g68e0b3df2 (2023-03-13T14:32:22-07:00)
DB Schema 2022_09_03_091314_update_ports_adsl_table_with_defaults (248)
PHP 8.1.2-1ubuntu2.11
Python 3.10.6
Database MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.5.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[WARN] Using database for locking, you should set CACHE_DRIVER=redis
[OK] rrd_dir is writable
[OK] rrdtool version ok
“Exception: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated”
“/opt/librenms/LibreNMS/Validations/User.php:95”


None of the graphs are working, but I don’t see any errors on the WebUI

Hello, i am having similar problems with a new install on AlmaLinux 9. RRD files are being created but are not shown and in some pages i have PHP errors.

Services page
“Exception: Undefined array key “view”” // app/Providers/ErrorReportingProvider.php:63
“/opt/librenms/includes/html/pages/services.inc.php:34” // app/Providers/ErrorReportingProvider.php:63
“Exception: Undefined array key “state”” // app/Providers/ErrorReportingProvider.php:63
“/opt/librenms/includes/html/pages/services.inc.php:45” // app/Providers/ErrorReportingProvider.php:63

validate.php

Component Version
LibreNMS 23.4.1-61-g09b3c88ae (2023-05-11T22:51:12+02:00)
DB Schema 2023_04_12_174529_modify_ports_table (250)
PHP 8.1.18
Python 3.9.16
Database MariaDB 10.5.16-MariaDB
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.5.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
“Exception: stream_socket_client(): Unable to connect to tcp://127.0.0.1:6379 (Connection refused)” // app/Providers/ErrorReportingProvider.php:63
“/opt/librenms/vendor/predis/predis/src/Connection/StreamConnection.php:108” // app/Providers/ErrorReportingProvider.php:63
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
“Exception: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated” // app/Providers/ErrorReportingProvider.php:63
“/opt/librenms/LibreNMS/Validations/User.php:95” // app/Providers/ErrorReportingProvider.php:63

seeing the same, anyone have a solution? or cause?

I too am having this same issue. Has there been any reply to this issue? A fix?

Please, check this thread

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