Auto-update failure

We recieved this email yesterday. We did not tell it to update at 4:00PM.

This box is running Librenms, Weathermap, NFSEN,Smokeping, and Nagios plugins
Centos7
Virtual

the email we got:

From: LibreNMS [email protected]
Sent: Tuesday, January 19, 2021 4:00 PM
To: Mike [email protected]
Subject: [LibreNMS] Auto update has failed for libre01.xxx.com

We just attempted to update your install but failed. The information below should help you fix this.

LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 0 removals Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Class Crypt_CHAP_MD5 located in ./vendor/dapphp/radius/lib/Pear_CHAP.php
does not comply with psr-0 autoloading standard. Skipping.
Class Crypt_CHAP_MSv1 located in ./vendor/dapphp/radius/lib/Pear_CHAP.php
does not comply with psr-0 autoloading standard. Skipping.
Class Crypt_CHAP_MSv2 located in ./vendor/dapphp/radius/lib/Pear_CHAP.php
does not comply with psr-0 autoloading standard. Skipping.
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

********** this looks weird
Discovered Package: [32mdarkghosthunter/larapoke [39m
Discovered Package: [32mfideloper/proxy [39m Discovered Package: [32mfruitcake/laravel-cors [39m Discovered Package: [32mlaravel/tinker [39m Discovered Package: [32mlaravel/ui [39m Discovered Package: [32mlibrenms/laravel-vue-i18n-generator [39m
Discovered Package: [32mnesbot/carbon [39m Discovered Package: [32moriceon/toastr-5-laravel [39m
Discovered Package: [32mtightenco/ziggy [39m Discovered Package: [32mwpb/string-blade-compiler [39m
[32mPackage manifest generated successfully. [39m
55 packages you are using are looking for funding.
Use the composer fund command to find out more!

LibreNMS\ComposerHelper::postInstall
Illuminate\Foundation\ComposerScripts::postInstall
@php artisan vue-i18n:generate --multi-locales --format=umd @php
artisan view:cache
Compiled views cleared!

In Filesystem.php line 185:

file_put_contents(/opt/librenms/storage/framework/views/0bd97bb47cf7d250960

6ec13c68cc4d7db0f1bff.php): failed to open stream: Permission denied

Script @php artisan view:cache handling the post-install-cmd event returned with error code 1

  • The output of ./validate.php

bash-4.2$ ./validate.php

Component Version
LibreNMS 1.70.1-40-g43e323b
DB Schema 2020_10_12_095504_mempools_add_oids (191)
PHP 7.3.26
Python 3.6.8
MySQL 5.5.68-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Composer Version: 2.0.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
daily.php
html/plugins/Test/Test.inc.php
html/plugins/Test/Test.php
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/html/plugins/Weathermap/configs/InternetTrafficFlow.conf
/opt/librenms/html/plugins/Weathermap/configs/Building.conf
/opt/librenms/html/plugins/Weathermap/configs/County-Rings.conf
/opt/librenms/html/plugins/Weathermap/configs/Sheriffs-Office.conf
/opt/librenms/html/plugins/Weathermap/configs/JC.conf
/opt/librenms/html/plugins/Weathermap/configs/City.conf
/opt/librenms/html/plugins/Weathermap/configs/Top.conf
/opt/librenms/html/plugins/Weathermap/configs/Tie-Group.conf
/opt/librenms/html/plugins/Weathermap/configs/Landfill.conf
/opt/librenms/html/plugins/Weathermap/configs/Metro-Network.conf
/opt/librenms/html/plugins/Weathermap/configs/RC.conf
/opt/librenms/html/plugins/Weathermap/configs/City1.conf
/opt/librenms/html/plugins/Weathermap/configs/City2.conf
/opt/librenms/html/plugins/Weathermap/configs/City3.conf
/opt/librenms/html/plugins/Weathermap/configs/Point.conf
and 16 more…
bash-4.2$

Hi

This is a completely normal email when auto-update failed. And unless you disabled it (which we do not advise) autoupdates takes place every night.
(Can be changed in Global Settings / System / Updates / “Enable updates in daily.sh”)

As far as I can see, you modified manually “daily.php” which you should not do, it will surely break updates.
Plugin (Test.php) should be OK.

You may also have rights issues on the files. They should be owned by user “librenms” so never use “root” to play with librenms.

In order to fix this:

  • Log as root (or with a user with sudo rights) and fix the rights as suggested by the mail .
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
  • Log as user “librenms”
  • Go into you /opt/librenms directory, as user “librenms”
  • type
    git checkout daily.php
  • run
    ./daily.sh
  • If it does not run correctly, run it a 2nd time.

Bye

1 Like

This topic was automatically closed 186 days after the last reply. New replies are no longer allowed.