production.ERROR: Unsupported operand types: string / int

We are having issues with displaying a few devices. Mainly Cisco 3550 switches. The error that pops up on the page is Whoops, looks like something went wrong. Check your librenms.log.

Looking though the output of the discovery, it looks like we are getting a bunch of unknown vlan port ids.

Warning: Undefined array key “dot1dStpPortPathCost” in /opt/librenms/includes/discovery/ on line 52
10 GigabitEthernet0/10 SQL[e[1;33mSELECT * FROM ports_vlans WHERE device_id = ? AND port_id = ? AND vlan = ? e[0;33m[636,11959,1]e[0m 0.28ms]

From the librenms.log

production.ERROR: Unsupported operand types: string / int {“userId”:2,“exception”:"[object] (TypeError(code: 0): Unsupported operand types: string / int at /opt/librenms/LibreNMS/Util/Number.php:48)

Is there a way to disable snmpbulkwalk for a specific model and not the whole os? I wonder if that may be whats causing the issue. Hopefully we will replace these switches soon.

Edge Version 90.0.818.56 (Official build) (64-bit)

librenms.log -
poller.php -
discovery.php - I had to break this out into 2 different pastebins since it was too large


Component Version
LibreNMS 21.4.0-74-gfff8b8e83
DB Schema 2021_04_08_151101_add_foreign_keys_to_port_group_port_table (208)
PHP 8.0.3
Python 3.7.3
MySQL 10.5.9-MariaDB-1:10.5.9+maria~buster
RRDTool 1.7.1


[OK] Composer Version: 2.0.13
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[INFO] Detected Dispatcher Service


I remember I had the same problems and error messages with 2 cisco devices (old 3620)
when i upgraded my PHP from 7.4.3 to 8.0.3.
With 7.4.3 it worked. PHP 8.0.3 throw this error message.


I have created a pull request with a fix for this issue

(accidently deleted the old pull request when trying to update it)

PHP 8 Unit Conversion Fix by wolfraider · Pull Request #12857 · librenms/librenms (

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