Empty device listing pages. Debugging shows unexpected trailing data involving Carbon Traits Creator (InvalidFormatException)

Hi

I have every device page, both the general one and the specific categories ones, empty, blank.
Debugging gives this strange error:

Unexpected data found.
Trailing data {"userId":5,"exception":"[object] (Carbon\\Exceptions\\InvalidFormatException(code: 0): Unexpected data found.
Trailing data at /opt/librenms/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:687)"}

User 5 is the only user left on the librenms install. There have been others in the past but have been deleted around one month and a half, maybe two months.
So that’s why there is only one user with id=5.

I have validated everything, even the non-standard items.
So the output from my validate.php is:

$ ./validate.php 
===========================================
Component | Version
--------- | -------
LibreNMS  | 23.10.0 (2023-10-27T05:47:36+02:00)
DB Schema | 2023_10_20_075853_cisco_asa_add_default_limits (268)
PHP       | 8.1.25
Python    | 3.10.12
Database  | MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.6.5
[OK]    Dependencies up-to-date.
[WARN]  Debug enabled.  This is a security risk.
[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
[OK]    Redis is unavailable
[OK]    rrdtool version ok
[OK]    Connected to rrdcached

EDIT: Individual devices page give the same error on the page itself and formatting is a bit messed up.
I can provide a screenshot (sanitized) if needed.

The last change in librenms data has been switching snmp from v1 and v2c to v3 in 4 devices. After the change the install has been working for one-two weeks.

There should be a complete stack trace with the error. I can’t see where the error is generated in the code, so I can’t make any conclusions. Can you post the complete stack trace?

Yes, of course:

https://flareapp.io/share/x5MwxnpP#stack

Regards

Can you paste the output of this command?

php artisan tinker --execute='dump(\App\Models\Device::all()->map->getCurrentOutage()->pluck("going_down")->filter(fn($d) => ! is_int($d) && ! is_null($d))->all())'

This is the output:

ibrenms@systemx:~$ php artisan tinker --execute=‘dump(\App\Models\Device::all()->map->getCurrentOutage()->pluck(“going_down”)->filter(fn($d) => ! is_int($d) && ! is_null($d))->all())’
// vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:1

is colored orange, and the rest of the reply is dark grey.

Empty array [] is what is expected. I wonder how you are triggering this error.

Hi again

I’ve seen this Firefox-console error-reporting might help:

Maybe is this?

Regards

Hi there

In the end it has been resolved by making a backup of the database, restoring it, reinstalling php8.2 and all php dependencies and restarting php8.2-fpm daemon. This is ubuntu 22.04.

Thanks for all the time.

Regards
Alejandro

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