Error discovering fdb-table module
The problem
Error discovering fdb-table module. Check log file for more details.
root@librenms:/var/log/librenms # cat librenms.log |grep fdb [2022-03-11T01:00:03.802435+01:00] production.ERROR: Error discovering fdb-table module for localhost. Illegal offset type #0 /usr/local/www/librenms/includes/discovery/fdb-table.inc.php(29): include() [2022-03-11T07:00:02.306179+01:00] production.ERROR: Error discovering fdb-table module for localhost. Illegal offset type #0 /usr/local/www/librenms/includes/discovery/fdb-table.inc.php(29): include() [2022-03-11T07:00:03.446301+01:00] production.ERROR: Error discovering fdb-table module for localhost. Illegal offset type #0 /usr/local/www/librenms/includes/discovery/fdb-table.inc.php(29): include() [2022-03-11T13:00:03.629126+01:00] production.ERROR: Error discovering fdb-table module for localhost. Illegal offset type #0 /usr/local/www/librenms/includes/discovery/fdb-table.inc.php(29): include()
Output of ./validate.php
root@librenms:/usr/local/www/librenms # su -m www -c "validate.php"
====================================
Component | Version
--------- | -------
LibreNMS | 22.2.1
DB Schema | 2021_25_01_0129_isis_adjacencies_nullable (234)
PHP | 8.0.16
Python |
MySQL | 10.5.15-MariaDB
RRDTool | 1.7.2
SNMP | 5.9
====================================
[OK] Installed from package; no Composer required
[OK] Database connection successful
[OK] Database schema correct
[FAIL] python3 not found
[FIX]:
Install Python 3 for your system.
The python error is not true, its because FreeBSD does not link python3 to python3.X. If someone can point me to the code where the python detection is done I'll create a PR.
What was the last working version of LibreNMS?
21.5.1
Anything in the logs that might be useful for us?
I'm running FreeBSD 13-STABLE if that's relevant.
Seems like something odd with your install.
what is the output of lnms config:get install_dir
root@librenms:/usr/local/www/librenms # su -m www -c "./lnms config:get install_dir" /usr/local/www/librenms
I can't figure out what your error means.
[2022-03-11T13:00:03.629126+01:00] production.ERROR: Error discovering fdb-table module for localhost. Illegal offset type #0 /usr/local/www/librenms/includes/discovery/fdb-table.inc.php(29): include()
Line 29 of that file is an include, which is consistent with the error, but illegal offset is usually when you try to use null for an array key or something, which isn't really on that line.
I can't decipher or reproduce your issue, so I'm afraid I can't help you.
Is there a way I can run this discovery from the CLI? (maybe its more verbose with errors?)
./discovery.php -h <hostname> -m fdb-table -d
Does this help in any way?
root@librenms:/usr/local/www/librenms # su -m www -c "php ./discovery.php -h localhost -m fdb-table -d"
LibreNMS Discovery
SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.19ms]
SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.12ms]
SQL[select version() [] 0.13ms]
Warning: Undefined array key "local_sha" in /usr/local/www/librenms/discovery.php on line 71
===================================
Version info:
Commit SHA:
Commit Date: 1645175566
DB Schema: 2021_25_01_0129_isis_adjacencies_nullable (234)
PHP: 8.0.17
MySQL: 10.6.7-MariaDB
RRDTool: 1.7.2
SNMP: 5.9
==================================DEBUG!
Updating os_def.cache
Warning: file_put_contents(/usr/local/www/librenms/cache/os_defs.cache): Failed to open stream: No such file or directory in /usr/local/www/librenms/LibreNMS/Util/OS.php on line 111
Override discovery modules: fdb-table
SQL[SELECT * FROM `devices` WHERE disabled = 0 AND `hostname` LIKE 'localhost' ORDER BY device_id DESC [] 0.4ms]
SQL[select * from `devices` where `device_id` = ? limit 1 [6] 0.19ms]
SQL[select * from `devices_attribs` where `devices_attribs`.`device_id` = ? and `devices_attribs`.`device_id` is not null [6] 0.13ms]
localhost 6 freebsd [FPING] '/usr/local/sbin/fping' '-e' '-q' '-c' '3' '-p' '500' '-t' '500' '-O' '0' 'localhost'
response: xmt/rcv/%loss = 3/3/0%, min/avg/max = 0.032/0.066/0.088
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' 'SNMPv2-MIB::sysObjectID.0']
SNMPv2-MIB::sysObjectID.0 = SNMPv2-SMI::enterprises.123*.1.1
Modules status: Global+
OS
Device
#### Load disco module core ####
Attempting to initialize OS: freebsd
Attempting to initialize Group OS: unix
OS initialized: LibreNMS\OS\Shared\Unix
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs' '-v2c' '-c' 'COMMUNITY' '-OQXUte' '-On' 'udp:HOSTNAME:161' 'SNMPv2-MIB::sysObjectID.0' 'SNMPv2-MIB::sysDescr.0' 'SNMPv2-MIB::sysName.0']
.*.*.0 = .*.4.1.123*.1.1
.*.*.0 = vados.lan 2774037089 FreeBSD 13.1-STABLE
.*.*.0 = vados.lan
| vados.lan 2774037089 FreeBSD 13.1-STABLE | .1.3.6.1.4.1.12325.1.1.2.1.1 |
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/arris' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.1166.1.621.14.2.0']
SNMPv2-SMI::enterprises.1166.1.6* = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.8072.1.3.2.3.1.2.6.100.105.115.116.114.111']
NET-SNMP-EXTEND-MIB::nsExtendOutputFull[distro] = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/dell' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '1.3.6.1.4.1.674.11000.2000.500.1.2.1.0']
SNMPv2-SMI::enterprises.674.11000.2000.5*.0 = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/eltek' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.12148.10.2.6.0']
SNMPv2-SMI::enterprises.12*.0 = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/hikvision' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.39165.1.1.0']
SNMPv2-SMI::enterprises.39* = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/orvaldi' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.21111.1.1.1.6.0']
SNMPv2-SMI::enterprises.21*.6.0 = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '1.3.6.1.4.1.4515.1.3.6.1.1.1.2.0']
SNMPv2-SMI::enterprises.45*.*.0 = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpget' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/wisi' '-v2c' '-c' 'COMMUNITY' '-OQXUte' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.7465.20.2.9.1.2.1.3.1.2']
SNMPv2-SMI::enterprises.74*.*.1.2 = No Such Object available on this agent at this OID
OS: FreeBSD (freebsd)
Attempting to initialize OS: freebsd
Attempting to initialize Group OS: unix
OS initialized: LibreNMS\OS\Shared\Unix
>> Runtime for discovery module 'core': 0.2050 seconds with 276880 bytes
>> SNMP: [9/0.19s] MySQL: [0/0.00s] RRD: [0/0.00s]
#### Unload disco module core ####
Modules status: Global+
OS
Device
#### Load disco module fdb-table ####
SQL[SELECT `vlan_id`, `vlan_vlan` from `vlans` WHERE `device_id` = ? [6] 0.25ms]
SQL[SELECT * FROM `ports_fdb` WHERE `device_id` = ? [6] 0.12ms]
SNMP['/usr/local/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUsetX' '-m' 'Q-BRIDGE-MIB' '-M' '/usr/local/www/librenms/mibs' 'udp:HOSTNAME:161' 'dot1qTpFdbPort']
dot1qTpFdbPort = No Such Object available on this agent at this OID
SNMP['/usr/local/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUsetX' '-m' 'BRIDGE-MIB' '-M' '/usr/local/www/librenms/mibs' 'udp:HOSTNAME:161' 'dot1dTpFdbPort']
dot1dTpFdbPort[6:0:17:10:86:e3].24 = 2
dot1dTpFdbPort[6:36:2c:c4:ca:ec].41 = 2
dot1dTpFdbPort[6:68:63:59:6a:87].214 = 7
dot1dTpFdbPort[6:6a:63:59:6a:87].214 = 7
BRIDGE-MIB: SNMP['/usr/local/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUsetX' '-m' 'BRIDGE-MIB' '-M' '/usr/local/www/librenms/mibs' 'udp:HOSTNAME:161' 'dot1dBasePortIfIndex']
dot1dBasePortIfIndex[2] = 2
dot1dBasePortIfIndex[7] = 7
SQL[SELECT * FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ? [6,"2"] 0.39ms]
SQL[SELECT * FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ? [6,"7"] 0.21ms]
SNMP['/usr/local/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUsetX' '-m' 'Q-BRIDGE-MIB' '-M' '/usr/local/www/librenms/mibs' 'udp:HOSTNAME:161' 'dot1qVlanFdbId']
dot1qVlanFdbId = No Such Object available on this agent at this OID
Error discovering fdb-table module for localhost. Illegal offset type
#0 /usr/local/www/librenms/includes/discovery/fdb-table.inc.php(29): include()
#1 /usr/local/www/librenms/includes/discovery/functions.inc.php(157): include('/usr/local/www/...')
#2 /usr/local/www/librenms/discovery.php(118): discover_device(Array, true)
#3 {main}
SQL[insert into `eventlog` (`device_id`, `reference`, `type`, `datetime`, `severity`, `message`, `username`) values (?, ?, ?, ?, ?, ?, ?) [6,null,"discovery","2022-04-09 10:31:00",5,"Error discovering fdb-table module. Check log file for more details.",""] 1.56ms]
>> Runtime for discovery module 'fdb-table': 0.1240 seconds with 453400 bytes
>> SNMP: [0/0.00s] MySQL: [5/0.03s] RRD: [0/0.00s]
#### Unload disco module fdb-table ####
SQL[UPDATE `devices` set `last_discovered`=NOW(),`last_discovered_timetaken`=? WHERE `device_id` = ? [1.372,6] 1.55ms]
Discovered in 1.372 seconds
./discovery.php localhost 2022-04-09 10:31:00 - 1 devices discovered in 1.526 secs
SNMP [10/0.22s]: Snmpget[10/0.22s]
SQL [15/0.07s]: Select[13/0.04s] Insert[1/0.02s] Update[1/0.02s]
RRD [0/0.00s]:
Unfortunately, there is an error that it doesn't show the full error message in the poller output.
Run ./daily.sh (assuming you are using the daily release channel) and then run it again.
I only need the part that starts with Error discovering fdb-table module and all the # lines
Apologies for the bump, but this has started happening to me today.
Here is my output starting from the error I get after running ./discovery.php -h 10.101.254.10 -m fdb-table -d:
Error discovering fdb-table module for 10.101.254.10. TypeError: Cannot access offset of type string on string in /opt/librenms/includes/discovery/fdb-table/bridge.inc.php:62
Stack trace:
#0 /opt/librenms/includes/discovery/fdb-table.inc.php(29): include()
#1 /opt/librenms/includes/discovery/functions.inc.php(164): include('...')
#2 /opt/librenms/discovery.php(108): discover_device()
#3 {main}
SQL[insert into `eventlog` (`reference`, `type`, `datetime`, `severity`, `message`, `username`, `device_id`) values (?, ?, ?, ?, ?, ?, ?) [null,"discovery","2024-01-15 11:41:11",5,"Error discovering fdb-table module. Check log file for more details.","",2] 0.76ms]
Cannot access offset of type string on string {"exception":"[object] (TypeError(code: 0): Cannot access offset of type string on string at /opt/librenms/includes/discovery/fdb-table/bridge.inc.php:62)"}
Runtime for discovery module 'fdb-table': 0.8860 seconds with 561304 bytes
SNMP: [0/0.00s] MySQL: [14/0.06s] RRD: [0/0.00s]
\#### Unload disco module fdb-table ####
SQL[update `devices` set `last_discovered_timetaken` = ?, `last_discovered` = NOW() where `device_id` = ? [1.995,2] 0.58ms]
Discovered in 1.995 seconds
./discovery.php 10.101.254.10 2024-01-15 11:41:11 - 1 devices discovered in 2.222 secs
SNMP [2/0.07s]: Snmpget[2/0.07s]
SQL [22/0.09s]: Select[20/0.08s] Insert[1/0.01s] Update[1/0.01s]
RRD [0/0.00s]:
daily.sh:
[librenms@nms01 ~]$ ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[librenms@nms01 ~]$
validate.php:
[librenms@nms01 ~]$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS | 24.1.0-24-g41d26a087 (2024-01-15T10:12:48+01:00)
DB Schema | 2023_12_08_184652_mpls_addrtype_fix (276)
PHP | 8.2.14
Python | 3.9.18
Database | MariaDB 10.5.22-MariaDB
RRDTool | 1.7.2
SNMP | 5.9.1
===========================================
[OK] Composer Version: 2.6.6
[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
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[librenms@nms01 ~]$