Libre not showing Devices

Hi, Guys so for some unexplained reason my Libre server just decided to stop showing my devices.

any idea as to how I can fix this?

Check the librenms logs, can be rrdcached problem.

[2019-07-18 10:15:53] production.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘topChanges’ cannot be null (SQL: UPDATE stp set protocolSpecification=ieee8021d,priority=32768,topChanges=,rootCost=,rootPort=,maxAge=0,helloTime=0,holdTime=0,forwardDelay=0,bridgeMaxAge=0,bridgeHelloTime=0,bridgeForwardDelay=0,device_id=56,timeSinceTopologyChange=0,designatedRoot=,bridgeAddress=5a7037e2ef7b,rootBridge=0 WHERE device_id = 56) (SQL: UPDATE stp set protocolSpecification=ieee8021d,priority=32768,topChanges=,rootCost=,rootPort=,maxAge=0,helloTime=0,holdTime=0,forwardDelay=0,bridgeMaxAge=0,bridgeHelloTime=0,bridgeForwardDelay=0,device_id=56,timeSinceTopologyChange=0,designatedRoot=,bridgeAddress=5a7037e2ef7b,rootBridge=0 WHERE device_id = 56)#0 /opt/librenms/includes/polling/stp.inc.php(116): dbUpdate(Array, ‘stp’, ‘device_id = ?’, Array)
#1 /opt/librenms/includes/polling/functions.inc.php(309): include(’/opt/librenms/i…’)
#2 /opt/librenms/poller.php(157): poll_device(Array, false)
#3 {main}

That is just showing that a certain spanning tree change can’t be inserted to the database because the field topChanges is NULL. That shouldn’t have any effect on the application not being able to connect to the backend. Check also your webserver error logs.

Hi Elias,

These are the logs I have.
daily.log
access_log
discover_device_1.log
error_log
librenms.log

[2019-07-18 10:27:00] production.ERROR: Could not connect to database! SQLSTATE[HY000] [2002] No such file or directory (SQL: SELECT COUNT() FROM ports WHERE device_id = 119 AND ifType in (‘adsl’,‘vdsl’))#0 /opt/librenms/includes/polling/ports.inc.php(324): dbFetchCell('SELECT COUNT()…’, Array)
#1 /opt/librenms/includes/polling/functions.inc.php(309): include(’/opt/librenms/i…’)
#2 /opt/librenms/poller.php(157): poll_device(Array, false)

Try to see if your services can connect to the database
Looks like it cant connect for data

how do I test?

here is my validate

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

Component Version
LibreNMS 1.53.1-33-g3ead46254
DB Schema 2019_05_30_225937_device_groups_rewrite (135)
PHP 7.2.19-0ubuntu0.18.04.1
MySQL 10.1.40-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Looks indeed like the webserver can’t make a database connection. But since the validation shows connection successful I’m not sure where the problem is. Recheck your .env and config.php files for the db settings and try to manually make a connection with the specified credentials. You can also check mariadb logs to see if there are any errors.

its a error in my config.php I restored the default and now its working…

Libre is literally the season 4 of Stranger Things

1 Like

This broke my Page

“$config[‘favicon’] = ‘images/e7977fea92d9bd5e91fcee05cbee4f6a.ico.png’;”

1 Like

Sounds odd indeed, but at least it’s resolved :slight_smile:

Thanks for your help

same, Problem with backend - after update
LibreNMS | 1.53.1-6-g161849219 >> 1.53.1-33-g3ead46254

Problem with $config[‘favicon’] won’t work anymore

“# $config[‘favicon’] = ‘images/custom/favicon.ico’;”

./validate.php

Component Version
LibreNMS 1.53.1-33-g3ead46254
DB Schema 2019_05_30_225937_device_groups_rewrite (135)
PHP 7.2.19
MySQL 5.7.26-log
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

you can manually update the favicon right here!

vi /opt/librenms/storage/framework/views/627ff1a3d6fd14fd80e61ab44eeed4256b7ca699.php

and it works 100%

Yes if you make any changes to config.php and it’s not formatted correctly it will break php

1 Like

Also me the same problem.
In config.php, if I comment the line:

$config[ ‘favicon’ ] = ‘images/custom/favicon.ico’ ;

everything works fine.

I think it is related to some modification committed yesterday.

Yes it could be would need look in the git commits

also no ports are showing.

1 Like

Also me.
Seems that the database is consistent and polling functionality works well. The problem seems related to display info on webUI.

I would like to test to rollback commit #10447.

Anyone knows hot to do it?

Thanks and regards

1 Like