LIbre not working after manual update

Hello,

Today i’ve realized that i have outdated version of LibreNMS and in validate.php output i found “Your install is over 24 hours out of date” so I tried manual update using commands:

su - librenms
git pull
./daily.sh

But during update some errors occured, I saved the console output:

$ ./daily.sh
PHP Fatal error: Declaration of App\Exceptions\Handler::render($request, Throwable $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::render($request, Exception $e) in /opt/librenms/app/Exceptions/Handler.php on line 9
PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php:779
Stack trace:
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(779): ReflectionClass->__construct(‘App\Exceptions\…’)
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(658): Illuminate\Container\Container->build(‘App\Exceptions\…’)
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(609): Illuminate\Container\Container->resolve(‘App\Exceptions\…’, Array)
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(759): Illuminate\Container\Container->make(‘App\Exceptions\…’, Array)
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(264): Illuminate\Foundation\Application->make(‘App\Exceptions\…’, Array)
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): Il in /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
Python 3 dependencies missing, switched to php71-python2 branch. OK
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

After that, trying to get to login page results in a blank page, now validate.php output shows also :
$ ./validate.php

In PackageManifest.php line 122:

Undefined index: name

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

Component Version
LibreNMS 1.63-57-g0040f38d1
DB Schema Not Connected (0)
PHP 7.2.24-0ubuntu0.18.04.7
Python 3.8.5
MySQL ?
RRDTool 1.7.2
SNMP NET-SNMP 5.8

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

[OK] Composer Version: 2.0.7
[OK] Dependencies up-to-date.
$

After machine reboot, I also have this when trying to get to login page:

/ / |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We’ll simply require it | into the script here so that we don’t have to worry about manual | loading any of our classes later on. It feels great to relax. | / require DIR.’/…/bootstrap/autoload.php’; / |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight our users. | / $app = require_once DIR.’/…/bootstrap/app.php’; / |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request | through the kernel, and send the associated response back to | the client’s browser allowing them to enjoy the creative | and wonderful application we have prepared for them. | */ $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); $response->send(); $kernel->terminate($request, $response);

Is any chance to recover from that errors or just reinstallation?

Cheers,

Szymon

Librenms is not able to talk to MySQL - make sure its running.

MySQL is running, I’ve checked also data for LibreNMS using same user as libre and everything is in place:


mysql Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Connection id: 41
Current database:
Current user: librenms@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ‘’
Using delimiter: ;
Server: MariaDB
Server version: 10.3.25-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 19 hours 5 min 36 sec


Database: librenms
±--------------------------+
| Tables |
±--------------------------+
| access_points |
| alert_device_map |
| alert_group_map |
| alert_log |
| alert_rules |
| alert_schedulables |
| alert_schedule |
| alert_template_map |
| alert_templates |
| alert_transport_groups |
| alert_transport_map |
| alert_transports |
| alerts |
| api_tokens |
| application_metrics |
| applications |
| authlog |
| bgpPeers |
| bgpPeers_cbgp |
| bill_data |
| bill_history |
| bill_perms |
| bill_port_counters |
| bill_ports |
| bills |
| callback |
| cef_switching |
| ciscoASA |
| component |
| component_prefs |
| component_statuslog |
| config |
| customers |
| dashboards |
| dbSchema |
| device_graphs |
| device_group_device |
| device_groups |
| device_mibs |
| device_oids |
| device_perf |
| device_relationships |
| devices |
| devices_attribs |
| devices_perms |
| entPhysical |
| entPhysical_state |
| entityState |
| eventlog |
| graph_types |
| hrDevice |
| ipsec_tunnels |
| ipv4_addresses |
| ipv4_mac |
| ipv4_networks |
| ipv6_addresses |
| ipv6_networks |
| juniAtmVp |
| links |
| loadbalancer_rservers |
| loadbalancer_vservers |
| locations |
| mac_accounting |
| mefinfo |
| mempools |
| mibdefs |
| migrations |
| mpls_lsp_paths |
| mpls_lsps |
| munin_plugins |
| munin_plugins_ds |
| netscaler_vservers |
| notifications |
| notifications_attribs |
| ospf_areas |
| ospf_instances |
| ospf_nbrs |
| ospf_ports |
| packages |
| pdb_ix |
| pdb_ix_peers |
| perf_times |
| plugins |
| poller_cluster |
| poller_cluster_stats |
| poller_groups |
| pollers |
| ports |
| ports_adsl |
| ports_fdb |
| ports_nac |
| ports_perms |
| ports_stack |
| ports_statistics |
| ports_stp |
| ports_vlans |
| processes |
| processors |
| proxmox |
| proxmox_ports |
| pseudowires |
| route |
| sensors |
| sensors_to_state_indexes |
| services |
| session |
| slas |
| state_indexes |
| state_translations |
| storage |
| stp |
| syslog |
| tnmsneinfo |
| toner |
| transport_group_transport |
| ucd_diskio |
| users |
| users_prefs |
| users_widgets |
| vlans |
| vminfo |
| vrf_lite_cisco |
| vrfs |
| widgets |
| wireless_sensors |
±--------------------------+

Everything stopped working after running manually daily.sh and in this run Libre was able to connect to database :
$ ./daily.sh
PHP Fatal error: Declaration of App\Exceptions\Handler::render($request, Throwable $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::render($request, Exception $e) in /opt/librenms/app/Exceptions/Handler.php on line 9
PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php:779
Stack trace:
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(779): ReflectionClass->__construct(‘App\Exceptions\…’)
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(658): Illuminate\Container\Container->build(‘App\Exceptions\…’)
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(609): Illuminate\Container\Container->resolve(‘App\Exceptions\…’, Array)
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(759): Illuminate\Container\Container->make(‘App\Exceptions\…’, Array)
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(264): Illuminate\Foundation\Application->make(‘App\Exceptions\…’, Array)
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): Il in /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
Python 3 dependencies missing, switched to php71-python2 branch. OK
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

validate showed its not able to talk to DB check the username and password in config.php