I have updated PHP 7.4 to 8.1 by performing a Ubuntu distro upgrade.
However, I now get a 502 Bad Gateway appear when trying to access my installation via the web GUI.
I have run ./validate.php a couple of times and resolved some of the issues, but I’m stuck on this/these particular errors and am unsure of how to sort these.
I would check to see if there are changes between your current code and the branch, which could be causing trouble. If there are, I’d get rid of the code that you have, and get it fresh, as I don’t know how old your system is (my LibreNMS version is 22, so you seem pretty far behind). As always, I strongly recommend taking a backup + snapshot, since I don’t know your environment and might give bad advice.
Check to see what files, if any, are changed on your system:
$ git status
There may be some. Show the output here.
Check to see what version of code you’re on.
$ git rev-parse HEAD
If your output shows that the code is super old, I can give you more information about how you might force update it.
Then, run your daily.sh script and the validate script. Restart services. Paste any errors from the previous steps here, and assuming that it goes as planned, paste the output of your validate script.
By executing those commands, I’ve now got a fully functional LibreNMS again.
It’s very strange how you said that it’s 3 years out of date…we had it installed back in November 2021 (though that was by a 3rd party company, so perhaps they installed an older build that they just had handy).
Here is the most recent output of ./validate.php - it all looks good except for needing the timezone to be set…
Not sure what that company was thinking. You were up to date… on a branch that stopped being maintained in 2019, for PHP 5.6. That sort of blows me away.
Anyway, the other issue can be resolved by editing that file and putting in your timezone, then restarting php-fpm. Here’s a list of valid options.