Installation broken after update

After the last update, my installation is broken.
Please note that my installation is running in a FreeBSD 11.1 jail!

[librenms@nd-jail-1 ~]$ ./validate.php

Component Version
LibreNMS 1.39-52-gc664fbe1a
DB Schema 250
PHP 7.1.17
MySQL 10.2.14-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] The poller () has not completed within the last 5 minutes, check the cron job.
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX] You can fix this with ./scripts/github-remove
Modified Files:
includes/defaults.inc.php

I had to comment out Line 861, as the file ‘/proc/sys/kernel/hostname’ does not exist inside my jails file system.

#$config[‘distributed_poller_name’] = trim(file_get_contents(‘/proc/sys/kernel/hostname’));

I am getting the following errors in my http error log.
Before commenting out the line 861 above, it would also complain about the file being nonexistant aswell.

[Mon May 14 12:39:29.498750 2018] [php7:notice] [pid 78718] [client 192.168.31.12:37174] [2018-05-14 12:39:29] production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:43\nStack trace:\n#0 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(27): Illuminate\Encryption\Encrypter->__construct(‘’, ‘AES-256-CBC’)\n#1 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(726): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)\n#2 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build(Object(Closure))\n#3 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve(‘encrypter’)\n#4 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make(‘encrypter’)\n#5 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(862): Illuminate\Foundation\Application->make(‘encrypter’)\n#6 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(790): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))\n#7 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(757): Illuminate\Container\Container->resolveDependencies(Array)\n#8 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build(‘App\\Http\\Middle…’)\n#9 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve(‘App\\Http\\Middle…’)\n#10 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make(‘App\\Http\\Middle…’)\n#11 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(138): Illuminate\Foundation\Application->make(‘App\\Http\\Middle…’)\n#12 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))\n#13 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))\n#14 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(574): Illuminate\Pipeline\Pipeline->then(Object(Closure))\n#15 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(533): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))\n#16 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(511): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))\n#17 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))\n#18 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))\n#19 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))\n#20 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))\n#21 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))\n#22 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))\n#23 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))\n#24 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))\n#25 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))\n#26 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))\n#27 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))\n#28 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))\n#29 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))\n#30 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))\n#31 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))\n#32 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))\n#33 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))\n#34 /usr/local/www/librenms/html/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))\n#35 {main} \n
[Mon May 14 12:39:29.501320 2018] [php7:notice] [pid 78718] [client 192.168.31.12:37174] [2018-05-14 12:39:29] production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:43\nStack trace:\n#0 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(27): Illuminate\Encryption\Encrypter->__construct(‘’, ‘AES-256-CBC’)\n#1 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(726): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)\n#2 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build(Object(Closure))\n#3 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve(‘encrypter’)\n#4 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make(‘encrypter’)\n#5 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(862): Illuminate\Foundation\Application->make(‘encrypter’)\n#6 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(790): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))\n#7 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(757): Illuminate\Container\Container->resolveDependencies(Array)\n#8 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build(‘App\\Http\\Middle…’)\n#9 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve(‘App\\Http\\Middle…’)\n#10 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make(‘App\\Http\\Middle…’)\n#11 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(215): Illuminate\Foundation\Application->make(‘App\\Http\\Middle…’)\n#12 /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\Foundation\Http\Kernel->terminateMiddleware(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))\n#13 /usr/local/www/librenms/html/index.php(58): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))\n#14 {main} \n

I tried following the following suggestions without any luck.

Probably worth removing the APP_KEY line then running: php artisan key:generate

Thanks alot!

That kinda led me to the solution.
For some reason i ended up with two base64 encoded keys in my bootstrap/cache/config.php

I still believe that the root cause for this mess was the failure during upgrade, caused by

$config[‘distributed_poller_name’] = trim(file_get_contents(’/proc/sys/kernel/hostname’));

i’d suggest using env(‘hostname -s’) or the likes instead.

Or this will always fail for BSD users inside a jail imho!

Feel free to submit a pull request.

Will this php code work php_uname('n')?

yes it does