Hello Everyone,
Building my own LibreNMS+Oxidized install has been my attempt to clean some rust off some very old linux skills I haven’t flexed in many years. Its a learning exercise for me, but slugging through it has been extremely rewarding.
Once I got LibreNMS + Oxidized up and running, I was feeling pretty good. Then I wondered “how do I keep oxidized up to date” and read somewhere to run “gem update”. Anyways, that ran for a very long time and updated a whole bunch of stuff I don’t think I even had or needed and now both web interfaces are down and my validate.php looks like i’ve destroyed whatever I built.
Validate PHP and whatever I could copy from the gem update below
librenms@LibreNMS:~$ ./validate.php
PHP Fatal error: Uncaught ReflectionException: Class \LibreNMS\Validations\System does not exist in /opt/librenms/LibreNMS/Validator.php:52
Stack trace:
#0 /opt/librenms/LibreNMS/Validator.php(52): ReflectionClass->__construct()
#1 /opt/librenms/validate.php(111): LibreNMS\Validator->__construct()
#2 {main}
thrown in /opt/librenms/LibreNMS/Validator.php on line 52
PHP Fatal error: Uncaught Error: Class 'Illuminate\Support\Str' not found in /opt/librenms/LibreNMS/Config.php:128
Stack trace:
#0 /opt/librenms/LibreNMS/Util/Git.php(33): LibreNMS\Config::get()
#1 /opt/librenms/LibreNMS/Util/Version.php(39): LibreNMS\Util\Git::repoPresent()
#2 /opt/librenms/LibreNMS/Util/Version.php(44): LibreNMS\Util\Version->__construct()
#3 /opt/librenms/includes/common.php(766): LibreNMS\Util\Version::get()
#4 /opt/librenms/validate.php(84): version_info()
#5 [internal function]: {closure}()
#6 {main}
thrown in /opt/librenms/LibreNMS/Config.php on line 128
Fatal error: Uncaught ReflectionException: Class \LibreNMS\Validations\System does not exist in /opt/librenms/LibreNMS/Validator.php:52
Stack trace:
#0 /opt/librenms/LibreNMS/Validator.php(52): ReflectionClass->__construct()
#1 /opt/librenms/validate.php(111): LibreNMS\Validator->__construct()
#2 {main}
thrown in /opt/librenms/LibreNMS/Validator.php on line 52
Fatal error: Uncaught Error: Class 'Illuminate\Support\Str' not found in /opt/librenms/LibreNMS/Config.php:128
Stack trace:
#0 /opt/librenms/LibreNMS/Util/Git.php(33): LibreNMS\Config::get()
#1 /opt/librenms/LibreNMS/Util/Version.php(39): LibreNMS\Util\Git::repoPresent()
#2 /opt/librenms/LibreNMS/Util/Version.php(44): LibreNMS\Util\Version->__construct()
#3 /opt/librenms/includes/common.php(766): LibreNMS\Util\Version::get()
#4 /opt/librenms/validate.php(84): version_info()
#5 [internal function]: {closure}()
#6 {main}
thrown in /opt/librenms/LibreNMS/Config.php on line 128
Gem update
Pastebin
Try something like
php artisan optimize:clear
./scripts/composer_wrapper.php install --no-dev
./daily.sh
Thanks for responding Jellyfrog. Sorry but I’m really new to this - I tried your first command and it didn’t come back so well…
root@LibreNMS:/opt/librenms# ls
AUTHORS.md billing-calculate.php cronic librenms-service.py phpunit.xml services-wrapper.py
CHANGELOG.md bootstrap daily.php librenms.cron ping.php snmp-scan.py
CODE_OF_CONDUCT.md cache daily.sh librenms.nonroot.cron poll-billing.php snmpd.conf.example
CONTRIBUTING.md check-services.php database licenses poller-wrapper.py snmptrap.php
LICENSE.txt composer.json delhost.php lnms poller.php sql-schema
LibreNMS composer.lock discovery-wrapper.py logs renamehost.php storage
README.md composer.phar discovery.php mibs requirements.txt syslog.php
addhost.php config dist-pollers.php misc resources tests
adduser.php config.php doc mkdocs.yml routes validate.php
alerts.php config.php.default html package-lock.json rrd vendor
app config_to_json.php includes package.json scripts webpack.mix.js
artisan contrib irc.php pbin.sh server.php
root@LibreNMS:/opt/librenms# ./validate.php
Do not run validate.php as root
root@LibreNMS:/opt/librenms#
root@LibreNMS:/opt/librenms#
root@LibreNMS:/opt/librenms#
root@LibreNMS:/opt/librenms#
root@LibreNMS:/opt/librenms# php artisan optimize:clear
PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /opt/librenms/app/Application.php:27
Stack trace:
#0 /opt/librenms/vendor/composer/ClassLoader.php(444): include()
#1 /opt/librenms/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /opt/librenms/bootstrap/app.php(14): spl_autoload_call()
#4 /opt/librenms/artisan(20): require_once('/opt/librenms/b...')
#5 {main}
thrown in /opt/librenms/app/Application.php on line 27
root@LibreNMS:/opt/librenms#
Youre running at root, which the docs, the validator-script and other places says you really shouldn’t.
And you didnt run the rest of the commands