I ran into an issue with the new Nokia MPLS path visualisation feature https://github.com/librenms/librenms/pull/10936 added to master in v1.59. Looks like all works good on an 7750SR device, not on a 7705SAR.
During discovery I see the following error:
`SQL[select * from `mpls_lsp_paths` where `mpls_lsp_paths`.`device_id` = ? and `mpls_lsp_paths`.`device_id` is not null [319] 0.89ms]
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('insert into `mp...', Array, Object(Closure))
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\Database\Connection->run('insert into `mp...', Array, Object(Closure))
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(411): Illuminate\Database\Connection->statement('insert into `mp...', Array)
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert into `mp...', Array)
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2690): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert into `mp...', Array, 'lsp_path_id')
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1353): Illuminate\Database\Query\Builder->insertGetId(Array, 'lsp_path_id')
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(839): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(804): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder))
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(252): Illuminate\Database\Eloquent\Model->save()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(264): Illuminate\Database\Eloquent\Relations\HasOneOrMany->save(Object(App\Models\MplsLspPath))
#11 /opt/librenms/LibreNMS/DB/SyncsModels.php(56): Illuminate\Database\Eloquent\Relations\HasOneOrMany->saveMany(Object(Illuminate\Support\Collection))
#12 /opt/librenms/LibreNMS/Modules/Mpls.php(56): LibreNMS\Modules\Mpls->syncModels(Object(App\Models\Device), 'mplsLspPaths', Object(Illuminate\Support\Collection))
#13 /opt/librenms/includes/discovery/mpls.inc.php(31): LibreNMS\Modules\Mpls->discover(Object(LibreNMS\OS\Timos))
#14 /opt/librenms/includes/discovery/functions.inc.php(178): include('/opt/librenms/i...')
#15 /opt/librenms/discovery.php(121): discover_device(Array, false)
#16 {main}
Error in mpls module. SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'mplsLspPathOperMetric' cannot be null (SQL: insert into `mpls_lsp_paths` (`lsp_id`, `path_oid`, `device_id`, `mplsLspPathRowStatus`, `mplsLspPathLastChange`, `mplsLspPathType`, `mplsLspPathBandwidth`, `mplsLspPathOperBandwidth`, `mplsLspPathAdminState`, `mplsLspPathOperState`, `mplsLspPathState`, `mplsLspPathFailCode`, `mplsLspPathFailNodeAddr`, `mplsLspPathMetric`, `mplsLspPathOperMetric`, `mplsLspPathTunnelARHopListIndex`, `mplsLspPathTunnelCHopListIndex`) values (431, 1, 319, active, 44280, primary, 0, 0, inService, inService, active, noError, 0.0.0.0, 400, ?, 4, 80))Preformatted text
Runtime for discovery module 'mpls': 110.3000 seconds with 499320 bytes
Running discovery.php by hand gives me the following log:
#### Load disco module mpls ####
MPLS LSPs: SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUs' '-m' 'TIMETRA-MPLS-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/nokia' '-t' '2' '-r' '3' 'udp:HOSTNAME:161' 'vRtrMplsLspTable'
]
SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUst' '-m' 'TIMETRA-MPLS-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/nokia' '-t' '2' '-r' '3' 'udp:HOSTNAME:161' 'vRtrMplsLspLastChange']
.........
MPLS LSP Paths: SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUs' '-m' 'TIMETRA-MPLS-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/nokia' '-t' '2' '-r' '3' 'udp:HOSTNAME:161' 'vRtrMplsLspPathTable']
SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUst' '-m' 'TIMETRA-MPLS-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/nokia' '-t' '2' '-r' '3' 'udp:HOSTNAME:161' 'vRtrMplsLspPathLastChange'
]
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('insert into `mp...', Array, Object(Closure))
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\Database\Connection->run('insert into `mp...', Array, Object(Closure))
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(411): Illuminate\Database\Connection->statement('insert into `mp...', Array)
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert into `mp...', Array)
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2690): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert
into `mp...', Array, 'lsp_path_id')
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1353): Illuminate\Database\Query\Builder->insertGetId(Array, 'lsp_path_id')
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(839): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(804): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder))
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(252): Illuminate\Database\Eloquent\Model->save()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(264): Illuminate\Database\Eloquent\Relations\HasOneOrMany->save(Object(App\Models\MplsLspPath))
#11 /opt/librenms/LibreNMS/DB/SyncsModels.php(56): Illuminate\Database\Eloquent\Relations\HasOneOrMany->saveMany(Object(Illuminate\Support\Collection))
#12 /opt/librenms/LibreNMS/Modules/Mpls.php(56): LibreNMS\Modules\Mpls->syncModels(Object(App\Models\Device), 'mplsLspPaths', Object(Illuminate\Support\Collection))
#13 /opt/librenms/includes/discovery/mpls.inc.php(31): LibreNMS\Modules\Mpls->discover(Object(LibreNMS\OS\Timos))
#14 /opt/librenms/includes/discovery/functions.inc.php(178): include('/opt/librenms/i...')
#15 /opt/librenms/discovery.php(121): discover_device(Array, false)
#16 {main}
Error in mpls module. SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'mplsLspPathOperMetric' cannot be null (SQL: insert into `mpls_lsp_paths` (`lsp_id`, `path_oid`, `device_id`, `mplsL
spPathRowStatus`, `mplsLspPathLastChange`, `mplsLspPathType`, `mplsLspPathBandwidth`, `mplsLspPathOperBandwidth`, `mplsLspPathAdminState`, `mplsLspPathOperState`, `mplsLspPathState`, `mplsLspPathFailCode`, `m
plsLspPathFailNodeAddr`, `mplsLspPathMetric`, `mplsLspPathOperMetric`, `mplsLspPathTunnelARHopListIndex`, `mplsLspPathTunnelCHopListIndex`) values (431, 1, 319, active, 44280, primary, 0, 0, inService, inServ
ice, active, noError, 0.0.0.0, 400, ?, 4, 80))
>> Runtime for discovery module 'mpls': 98.4500 seconds with 499320 bytes
>> SNMP: [4/98.44s] MySQL: [0/0.00s] RRD: [0/0.00s]
#### Unload disco module mpls ####
After this error the MPLS discovery is ended directly while normally there should be more MIB’s to query like SDP etc.