Updated Librenms VM, now cant access WebUI

/opt/librenms/scripts/composer_wrapper.php install --no-dev

LibreNMS\ComposerHelper::preInstall
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
LibreNMS\ComposerHelper::postInstall
Illuminate\Foundation\ComposerScripts::postInstall
php artisan optimize
PHP Notice: date_default_timezone_set(): Timezone ID ‘’ is invalid in /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 49
Generating optimized class loader
The compiled services file has been removed.

Try to access the Web… Which error you get?

Error: logs not writable! Run these commands as root on your LibreNMS server to fix:
chown -R librenms:librenms /opt/librenms/logs

setfacl -R -m g::rwx /opt/librenms/logs

setfacl -d -m g::rwx /opt/librenms/logs

If using SELinux you may also need:
semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/logs(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/logs(/.*)?’

restorecon -RFvv /opt/librenms/logs

all is writable.

Component Version
LibreNMS 1.39-32-ge4bc556
DB Schema 249
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 5.7.21-20-log
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

No working for me.
gbh@nsmonitor:/opt/librenms$ sudo ./scripts/composer_wrapper.php install --no-dev
Do not run Composer as root/super user! See How do I install untrusted packages safely? Is it safe to run Composer as superuser or root? - Composer for details

LibreNMS\ComposerHelper::preInstall
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested PHP extension ext-xml * is missing from your system. Install or enable PHP’s xml extension.
Problem 2
- Installation request for erusev/parsedown 1.7.1 → satisfiable by erusev/parsedown[1.7.1].
- erusev/parsedown 1.7.1 requires ext-mbstring * → the requested PHP extension mbstring is missing from your system.
Problem 3
- Installation request for laravel/framework v5.4.36 → satisfiable by laravel/framework[v5.4.36].
- laravel/framework v5.4.36 requires ext-mbstring * → the requested PHP extension mbstring is missing from your system.
Problem 4
- laravel/framework v5.4.36 requires ext-mbstring * → the requested PHP extension mbstring is missing from your system.
- oriceon/toastr-5-laravel dev-master requires illuminate/session >=5.0.0 → satisfiable by laravel/framework[v5.4.36].
- Installation request for oriceon/toastr-5-laravel dev-master → satisfiable by oriceon/toastr-5-laravel[dev-master].

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gd.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-snmp.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Don’t run composer as root, run it as the librenms user.
And you need to install the PHP extension mbstring that is appropriate for your PHP version.

For me still:
Error: logs not writable! Run these commands as root on your LibreNMS server to fix:
chown -R librenms:librenms /opt/librenms/logs

setfacl -R -m g::rwx /opt/librenms/logs

setfacl -d -m g::rwx /opt/librenms/logs

If using SELinux you may also need:
semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/logs(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/logs(/.*)?’

restorecon -RFvv /opt/librenms/logs

SOLVED! for me, /logs is mounted via nfs from data server. Acls does not work with this until update. But why? before update remote logs works great.

It worked for me. Librenms WebUI is up again!
Thks!

I am a novice here but had a wroking install on the 9th May we are using Centos7. I would suggest following an automatic update of LibreNMS over night the following day we get the error when trying to access the webui. I am not able to install the suggested ./scripts/composer_wrapper.php install --no-dev

I have tried a few of the fixes mentioned above but get the similar error when I execute.

-bash: php: command not found

If I try php -v i also get the same error. Pretty much any command I try to run that relates to php returns the above error.

Any ideas?

You’re not saying which directory you’re running this from or which user…

Should be /opt/librenms and run as the librenms user.

In Debian

su - librenms
cd /opt/librenms
./scripts/composer_wrapper.php install --no-dev

The fact that it’s apparently not finding your php is troubling though… suggests either php isn’t installed or isn’t on the path for that particular user/shell.

Sorry, the command is run form the /opt/librenms directory

Tried the suggestion and still no joy.

How can I check php is in the correct path or is installed?

This is my current error when running ./scripts/composer_wrapper.php install --no-dev

/usr/bin/env: php: No such file or directory

does php -v give output?

output is “-bash: php: command not found”

A post was split to a new topic: Composer-wrapper.php install --no-dev giving error

2 posts were split to a new topic: Unknown character set utf8mb4

A post was merged into an existing topic: Unknown character set utf8mb4

what steps you do to make your Librenms WebUI up?

Hi,
Please, check the answer by the user “ueli_siegrist” in the top of this page.
I followed the instructions step by step and worked!
Regards.