Bug 260085 - net-mgmt/librenms
Summary: net-mgmt/librenms
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dan Langille
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-28 01:55 UTC by Darren Henderson
Modified: 2022-01-01 22:10 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (dvl)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Henderson 2021-11-28 01:55:43 UTC
service librenms start fails. /var/log/librenms/librenms-service.log showing

env: php: No such file or directory
MainThread(ERROR):ERROR: Could not load or parse configuration! /usr/bin/env php /usr/local/www/librenms/config_to_json.php 2>&1: 
'NoneType' object has no attribute 'get'

The crux of the problem is that daemon starts with a very restricted path (/sbin:/bin:/usr/sbin:/usr/bin) - this causes env to fail to find php when /usr/local/www/librenms/snmp-scan.py attempts to grab the .env file.

I'm not sure what the "right" fix is for this, the two quickest work arounds are to add a soft link from /usr/bin/php to /usr/local/bin/php or adjusting the path in /usr/local/etc/rc.d/librenms to include /usr/local/bin. Neither of which I'm crazy about.
Comment 1 Dan Langille freebsd_committer 2021-11-28 13:06:47 UTC
Usually, this is patched by modifying the script in question with the full path to php. re SHEBANG_FILES

A new release is available, I'm sure - I may update the port with a new release and patch this file.

What version of librenms are you running? On what version of FreeBSD please?
Comment 2 Darren Henderson 2021-11-28 15:36:11 UTC
Apologies for neglecting to complete the summary before filing the report and for leaving out the relevant details.

I noted the issue on 13.0-RELEASE-p4. I installed librenms-21.5.1_3,1 via pkg which is tracking "latest". 

Other details in case they are helpful:

php74-7.4.25
mod_php74-7.4.25
python38-3.8.12_1
Comment 3 Francis GUDIN 2021-12-07 17:27:24 UTC
btw Dan: 21.10 would bring a useful improvement in my setting ("Infer character encoding for ifAlias and sysLocation"), so thank you very much in advance!
Comment 4 Dan Langille freebsd_committer 2021-12-07 17:28:58 UTC
This may take a while. I am overwhelmed with non-FreeBSD items at present.  Sorry.