Global Search has stopped working

Update to the latest and now the global search isn’t working. Wondering if anyone else is seeing it?

./validate.php

Component Version
LibreNMS 21.12.1
DB Schema 2021_11_29_165436_improve_ports_search_index (229)
PHP 7.4.3
Python 3.8.10
MySQL 10.3.32-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2
SNMP 5.8

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

+1. It broke a few weeks ago for me but I haven’t had time to submit a post. Just came in to see if anyone else had solved it yet…

Search works elsewhere, e.g. /devices, just not the global search box.

./validate.php

Component Version
LibreNMS 21.12.1
DB Schema 2021_11_29_165436_improve_ports_search_index (229)
PHP 7.4.19
Python 3.6.8
MySQL 10.5.13-MariaDB
RRDTool 1.7.0
SNMP 5.8

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

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

Works for me:

Check your developer console for anything.

I don’t know how to access a developer console or are you just referring to a shell window?

Depends on your browser: Chrome DevTools - Chrome Developers

I’m seeing some 403 errors on typeahead.bundle.min.js; not sure if that’s relevant or a red herring, but it’s the only out-of-place thing I’m seeing.


Here also stopped working. In other topics the solution was ./daily.sh but it didn’t fix the problem.

Definitely wouldn’t help that that file is 403ing.

What happens if you try to go straight to that JS file in your browser, does it still 403?

Same issue here, getting 404 errors, going to the link itself seems to indicate the file is not there.

device:1 GET http://librenms.**********.net:8080/ajax/search/device?search=je 404 (Not Found)

It does, and upon navigating to /opt/librenms/html/js and doing an ‘ls -larth’ I found that typeahead.bundle.min.js had permissions of 640 instead of 644.

Changing the permission to 644 fixed the search box.

No idea why that would have changed, I don’t make a habit of chowning or chmodding a working LibreNMS install…

Anyway, thanks for leading a horse to water.

1 Like

Thanks for confirming.

@ski522 can you try that please?

The permissions on that file is 644. I’m not getting a 403 error, I’m getting 404 errors.
Screenshot_20220105_164258

What web server are you using? Are you proxying requests before they get to the LibreNMS web server?

Apache, no web proxy. We do monthly pulls as this is a production system. It was working in December and if I go to Devices>All Devices and search from there it works fine.

We also did a system update too, maybe something changed with Apache and/or PHP.

Everything else seems to be working fine, so the issue is more of an inconvenience with having to go the the Devices page to search devices.

the same here, but with a different message
image

Okay, if we’re both getting 404’s then something is going on. I’m running on Ubuntu, but maybe a system update has affected something.

Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

That’s expected, we don’t have JS map files for debugging so they will always create 404s

What do you get if you run lnms route:list|grep 'ajax/search/port'

Blank, nothing is returned.

librenms@librenms2:~$ lnms route:list|grep 'ajax/search/port'
librenms@librenms2:~$

That explains it.

Can you post the full output of ./validate.php and lnms route:list