Selecting the "ports" menu for each device switches to an error page


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

Component Version
LibreNMS 24.6.0-14-g33c38a560 (2024-06-20T00:30:19+09:00)
DB Schema 2024_04_29_183605_custom_maps_drop_background_suffix_and_background_version (294)
PHP 8.1.2-1ubuntu2.17
Python 3.10.12
Database MariaDB 10.6.16-MariaDB-0ubuntu0.22.04.1
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
[INFO] fping FAILURES can be ignored if running LibreNMS in a jail without ::1. You may want to test it manually: fping ::1
[FAIL] /usr/bin/fping6 could not be executed. /usr/bin/fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exclusions may be required.
(/usr/bin/fping6: canā€™t create socket (must run as root?))
[OK] rrd_dir is writable
[OK] rrdtool version ok

./discovery.php -h HOSTNAME -d | ./pbin.sh
Paste endpoint: https://p.libren.ms/api/create
title:
name: noc
private: 1
expire: 0
Untitled - LibreNMS

./poller.php -h HOSTNAME -r -f -d | ./pbin.sh
Paste endpoint: https://p.libren.ms/api/create
title:
name: noc
private: 1
expire: 0
Untitled - LibreNMS

Since we donā€™t currently use ping in our environment, we didnā€™t pay much attention to ping-related errors.

hello. Dear brothers.

When I enter a device and select the ā€œportsā€ menu, I get an error page with this message ā€œOops, something seems to be wrong, please check librenms.logā€.

This is not the case for all registered devices, some are accessible to the ā€œportsā€ menu and some are not. But interestingly enough, if you select each physical interface in the dashboard of a device that does not have access to the ā€œportsā€ menu, you can access the individual interface page.

Iā€™ve been searching the community and trying different methods, but it doesnā€™t seem like there are any similar cases to mine, so Iā€™m stumped.

If anyone has solved this issue, I would love to know how you solved it.

Thank you.

1 Like

When the error occurs what is in the log file?

I looked at librenms.log, but there are too many and unnecessary logs,
Iā€™m not sure which logs to look at.
Can you post some logs to make it clearer?

delete the file, cause the error, look at what is in the file

When I deleted the file and caused an error, I got the error message below.


Call to a member function displayName() on null {ā€œviewā€:{ā€œviewā€:ā€œ/opt/librenms/resources/views/components/port-link.blade.phpā€,ā€œdataā€:[
]},ā€œuserIdā€:2,ā€œexceptionā€:ā€œ[object] (Spatie\LaravelIgnition\Exceptions\ViewException(code: 0): Call to a member function displayName() on null at /opt/librenms/resources/views/components/port-link.blade.php:4)
[previous exception] [object] (Error(code: 0): Call to a member function displayName() on null at /opt/librenms/storage/framework/views/78eb6cfc8bfb5dadb61279e2703027c8.php:13)ā€}

1 Like

Looks like somehow you have a port that doesnā€™t belong to a deviceā€¦

Having the same issues here for the past few days and even after the #16151 change.

Seeing these in the error logs causing the

SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column ā€˜ifInBroadcastPkts_rateā€™ at row 1 (Connection: mysql, SQL: UPDAT
E ports_statistics set ifInNUcastPkts=0,ifInNUcastPkts_prev=0,ifInNUcastPkts_rate=0,ifInNUcastPkts_delta=0,ifOutNUcastPkts=0,ifOutN UcastPkts_prev=0,ifOutNUcastPkts_rate=0,ifOutNUcastPkts_delta=0,ifInDiscards=0,ifInDiscards_prev=0,ifInDiscards_rate=0,ifInDiscards_ delta=0,ifOutDiscards=0,ifOutDiscards_prev=0,ifOutDiscards_rate=0,ifOutDiscards_delta=0,ifInUnknownProtos=0,ifInUnknownProtos_prev=
1506172,ifInUnknownProtos_rate=0,ifInUnknownProtos_delta=0,ifInBroadcastPkts=18446744073670168776,ifInBroadcastPkts_prev=0,ifInBroadcas tPkts_rate=3.1479085450016E+16,ifInBroadcastPkts_delta=9223372036854775807,ifOutBroadcastPkts=30421822,ifOutBroadcastPkts_prev=0,ifOutBr oadcastPkts_rate=103828.7440273,ifOutBroadcastPkts_delta=30421822,ifInMulticastPkts=48720486,ifInMulticastPkts_prev=0,ifInMulticastPkts_ rate=166281.5221843,ifInMulticastPkts_delta=48720486,ifOutMulticastPkts=0,ifOutMulticastPkts_prev=0,ifOutMulticastPkts_rate=0,ifOutMul ticastPkts_delta=0 WHERE port_id = 23840) (Connection: dbFacile, SQL: UPDATE ports_statistics set ifInNUcastPkts=0,ifInNUcastPkts_prev=
0,ifInNUcastPkts_rate=0,ifInNUcastPkts_delta=0,ifOutNUcastPkts=0,ifOutNUcastPkts_prev=0,ifOutNUcastPkts_rate=0,ifOutNUcastPkts_delta
=0,ifInDiscards=0,ifInDiscards_prev=0,ifInDiscards_rate=0,ifInDiscards_delta=0,ifOutDiscards=0,ifOutDiscards_prev=0,ifOutDiscards_r ate=0,ifOutDiscards_delta=0,ifInUnknownProtos=0,ifInUnknownProtos_prev=1506172,ifInUnknownProtos_rate=0,ifInUnknownProtos_delta=0,if InBroadcastPkts=18446744073670168776,ifInBroadcastPkts_prev=0,ifInBroadcastPkts_rate=3.1479085450016E+16,ifInBroadcastPkts_delta=92233720
36854775807,ifOutBroadcastPkts=30421822,ifOutBroadcastPkts_prev=0,ifOutBroadcastPkts_rate=103828.7440273,ifOutBroadcastPkts_delta=304218
22,ifInMulticastPkts=48720486,ifInMulticastPkts_prev=0,ifInMulticastPkts_rate=166281.5221843,ifInMulticastPkts_delta=48720486,ifOutMult icastPkts=0,ifOutMulticastPkts_prev=0,ifOutMulticastPkts_rate=0,ifOutMulticastPkts_delta=0 WHERE port_id = 23840)#0 /opt/librenms/inclu
des/polling/ports.inc.php(936): dbUpdate()

I ran ā€œ./lnms dev:checkā€ and then ā€œ./scripts/github-apply 5926ā€ as per the guide in the link, but I got the error message below. What should I do?


Checking patch .github/PULL_REQUEST_TEMPLATE.mdā€¦
error: while searching for:

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

error: patch failed: .github/PULL_REQUEST_TEMPLATE.md:6
error: .github/PULL_REQUEST_TEMPLATE.md: patch does not apply
Checking patch scripts/github-applyā€¦
error: scripts/github-apply: already exists in working directory
Checking patch scripts/github-removeā€¦
error: scripts/github-remove: already exists in working directory

You donā€™t need to do the ./lnms dev:check just the ./scripts/github-apply 16151

Hi! Iā€™m not sure if my server is having the same issue. Never used to happen before, but now, almost all of my switches are having this issue. Click on Ports, the error screen appears.

Check librenms.log and this error seems to pop up:

Missing required parameter for [Route: device] [URI: device/{device}/{tab?}/{vars?}] [Missing parameter: device]. {"view":{"view":"/opt/librenms/resources/views/components/device-link.blade.php","data":[]},"userId":14,"exception":"[object] (Spatie\\LaravelIgnition\\Exceptions\\ViewException(code: 0): Missing required parameter for [Route: device] [URI: device/{device}/{tab?}/{vars?}] [Missing parameter: device]. at /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php:35)
[previous exception] [object] (Illuminate\\Routing\\Exceptions\\UrlGenerationException(code: 0): Missing required parameter for [Route: device] [URI: device/{device}/{tab?}/{vars?}] [Missing parameter: device]. at /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php:35)"}

No issues seen with daily.sh or validate.php. Any advice would help, thanks! :grinning:

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