Python and updates issues

Hi,
A new librenms user here,

I have constant warning on Python section:
“WARN: Could not check Python dependencies because this script is not running as librenms
Fix:
The install docs show how this is done on a new install: Installing LibreNMS - LibreNMS Docs

and a Failure on updates section:
“FAIL: Failed to fetch version from local git: fatal: detected dubious ownership in repository at ‘/opt/librenms’ To add an exception for this directory, call: git config --global --add safe.directory /opt/librenms”

but when i run ./validate.php its all seems fine:

Component Version
LibreNMS 25.4.0-135-g8207e1efe (2025-05-12T11:50:30+03:00)
DB Schema 2025_05_03_152418_remove_invalid_sensor_classes (338)
PHP 8.3.6
Python 3.12.3
Database MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2
RRDTool 1.7.2
SNMP 5.9.4.pre2
===========================================

[OK] Composer Version: 2.8.8
[OK] Dependencies up-to-date.
[OK] Database Connected
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

It seems to me that i have some sort of ownership/permission issue, but no course of action i took resolved it.

I also get a warning “WARN: Your local git branch is not master, this will prevent automatic updates.”
but the output when i use “git checkout master”
is : “Already on ‘master’
Your branch is up to date with ‘origin/master’.”

any recommended actions? (using ubuntu 24.04)

If 24.04 can you share your fpm config?

What do you get from running sudo grep -n librenms /etc/php/8.3/fpm/pool.d/librenms.conf?

Here’s what my 24.04 shows:

user@lnms:~$ sudo grep -n librenms /etc/php/8.3/fpm/pool.d/librenms.conf
4:[librenms]
28:user = librenms
29:group = librenms
41:listen = /var/run/php-fpm-librenms.sock

I remember once changing the wrong section in this file and it causing a number of random and confusing errors I was chasing for a while.

Seems to be the same, execpt for listen part:

sudo grep -n librenms /etc/php/8.3/fpm/pool.d/librenms.conf
4:[librenms]
28:user = librenms
29:group = librenms
41:listen = /run/php-fpm-librenms.sock

Yours is correct to the doco then, so it’s not that. My socket /var path is something I’ve changed - as long as it matches whatever is in your nginx config then all good.

I’ve done many installs recently following the doco precisely with 24.04.2 with no issues - so I’m not sure what specifically has gone wrong.

Installing LibreNMS - LibreNMS Docs check that section and a bit beyond it, maybe something didn’t apply?

I just made another check,
in /etc/nginx/conf.d/librenms.conf > the line is “fastcgi_pass unix:/run/php/php-fpm.sock;”

while “41:listen = /run/php-fpm-librenms.sock”
the paths are not similar, could this be the problem?

Edit:
i also noticed that the socket belongs to another user (permission-wise):
srw-rw---- 1 www-data www-data 0 May 13 11:45 php-fpm-librenms.sock