Librenms has a "whoops, looks like something went wrong"

This morning i came back to a broken librenms install and it told me to check the librenms log. Validate looks clean.

[2020-05-15 08:48:50] production.ERROR: Erroneous data format for unserializing ‘Symfony\Component\Routing\CompiledRoute’ {“exception”:"[object] (ErrorException(code: 0): Erroneous data format for unserializing ‘Symfony\Component\Routing\CompiledRoute’ at /opt/librenms/bootstrap/cache/routes.php:15)
[stacktrace]
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘Erroneous data …’, ‘/opt/librenms/b…’, 15, Array)
#1 /opt/librenms/bootstrap/cache/routes.php(15): unserialize(‘O:34:"Illuminat…’)
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php(75): require(’/opt/librenms/b…’)
#3 [internal function]: Illuminate\Foundation\Support\Providers\RouteServiceProvider->Illuminate\Foundation\Support\Providers\{closure}(Object(App\Application))
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(866): call_user_func(Object(Closure), Object(App\Application))
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(815): Illuminate\Foundation\Application->fireAppCallbacks(Array)
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(210): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(App\Application))
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#9 /opt/librenms/app/Http/Kernel.php(96): Illuminate\Foundation\Http\Kernel->bootstrap()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): App\Http\Kernel->bootstrap()
#11 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#12 /opt/librenms/html/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#13 {main}
"}

Hi!
I have the same problem.

I deleted (moved to a backup-folder) the file /opt/librenms/bootstrap/cache/routes.php, after that the gui is loading again.

But when i run ./daily.sh, the file /opt/librenms/bootstrap/cache/routes.php exits again (so i thin it’s getting pulled from git) and i get the error massage like above again. when i delete the file again it works until i run ./daily.sh and so on.

./validate.php and ./daily.sh have no errors

Hope this helps :slight_smile:

last but not least: thank you so much for this awsome software!!!

Same here…

@hinnie @Gun_Runner

Make sure your php cli and web version match.

php -v for cli and in the LibreNMS interface: Gear -> About LibreNMS

1 Like

PHP 7.4.6 (cli) ,

I cant get to the web interface as it has the screen with the red " Whoops, looks like something went wrong." warning.

I got it back, I ran all this and it started working again:

sudo a2enmod php7.4
sudo update-alternatives --set php /usr/bin/php7.4
sudo update-alternatives --set phar /usr/bin/phar7.4
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.4
sudo update-alternatives --set phpize /usr/bin/phpize7.4
sudo update-alternatives --set php-config /usr/bin/php-config7.4

Perfect. The issue is when using different php versions for cli and web.

thanks for the hint, this was the solution for me.