We are having issue were our install of LibreNMS doesn’t update by itself… looks like something may have been corrupted…
Output of daily.sh and validate.php gives the following:
bash-4.2$ ./daily.sh
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Updating to latest codebase FAIL
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Updating Composer packages
Tried to solve, but doesn’t have that much git skills and needs help to get this resolved.
We do have a LibreNMS test machine (Clone of the production machine) that we can work with prior doing this on the production machine.
Both of them doing the exact same behavior as it’s a clone.
Yes the output is from daily.sh, I just stop capturing the text at “Updating Composer Packages”. The daily.sh fails following tasks: “Updating to latest codebase” and “Updating submodules”
Git status gives:
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
LibreNMS is installed locally, the only things is that the original installation directory was moved. (Symlink from /opt/librenms to /app/librenms)
There’s no GIT_DIR variable in both of our installations.
I don’t know from when did the issue occurs, we did noticed this when we were looking for a feature released in april 2019 and it was missing. Our Librenms installation isn’t that old (November 2018)
Daily.log says this:
Updating to latest codebase
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Returned: 128
Updating Composer packages
[Composer\Downloader\TransportException]
The “https://getcomposer.org/versions” file could not be downloaded: failed to open stream: Connection timed out
Updating submodules
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Returned: 128
The directory was moved from /opt/librenms to /app/librenms and we did a simlink to link them. But this is the strange thing… the .git directory doesn’t exist at all.
Will check on the backup when this folder dissapear, but if it was existing orignally it should have been moved with the mv.
Output of both command gives:
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Librenms installation crashing right after the “git reset” command. Getting http/500. Even after running validate.php it asks to run some commands witch I did and still failing with http/500…
[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database schema (271) is older than the latest (1000).
[FIX]:
Manually run ./daily.sh, and check for any errors.
[FAIL] The poller (s1186moniqcp.ssq.local) has not completed within the last 5 minutes, check the cron job.
[FAIL] Discovery has not completed in the last 24 hours.
[FIX]:
Check the cron job to make sure it is running and using discovery-wrapper.py
[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 /app/librenms
sudo setfacl -d -m g::rwx /app/librenms/rrd /app/librenms/logs /app/librenms/bootstrap/cache/ /app/librenms/storage/
sudo chmod -R ug=rwX /app/librenms/rrd /app/librenms/logs /app/librenms/bootstrap/cache/ /app/librenms/storage/
Files:
/app/librenms/disable_all_device.sql
/app/librenms/html/plugins/Weathermap/configs/Prod_Physical_FW.conf
/app/librenms/html/includes/graphs/generic_data.inc.php.orig
/app/librenms/includes/dbFacile.php_bck
/app/librenms/includes/polling/bck_netscaler-vsvr.inc.php
Run the daily.sh and it says this (It’s being stuck at Updating SQL-Schema):
Updating to latest codebase FAIL
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
root@librenms:/opt/librenms# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase FAIL
error: object file .git/objects/22/3a5b15dc238bba6858357582e97dd6c5275dd6 is empty
error: object file .git/objects/22/3a5b15dc238bba6858357582e97dd6c5275dd6 is empty
fatal: loose object 223a5b15dc238bba6858357582e97dd6c5275dd6 (stored in .git/objects/22/3a5b15dc238bba6858357582e97dd6c5275dd6) is corrupt
fatal: The remote end hung up unexpectedly
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK