Unable to access the WebUI

When I try to access the WebUI I get this message:

Error: Missing dependencies, run: composer install --no-dev

I use Google Chrome, but have tried IE and Firefox also. Same result.

I was using LibreNMS just fine yesterday, today I tried accessing it and suddenly get that result. Not sure why this just happened. I am just monitoring one device to test with. I tried doing a ‘shutdown -r’ to see if a reboot worked, but same result.

Any ideas?

run ./scripts/composer_wrapper.php install --no-dev

from murrant

3 Likes

If you get the “Composer not available, please manually install composer.” message, you can install with curl -sS https://getcomposer.org/installer | php

2 Likes

[root@librenms librenms]# ./scripts/composer_wrapper.php install --no-dev

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
- 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 2
- 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 3
- 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.ini

Please help me to solve this problem

up! For me too… php7.0 -mbstring, validate.php, daily.sh, scripts/composer_wrapper.php install --no-dev
chown -R librenms:librenms /opt/librenms and validate.sh:

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

via http:
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

HELP!

Similar issue, no WebUI after update.

I get this

EDIT
Ok I think we fixed our “Whoops, looks like something went wrong” laravel error after a few googles

/opt/librenms/.env file had no APP_KEY= set

so we ran sudo php artisan key:generate --force and it populated the APP_KEY in the .env file.

now librenms is working.

Try “php artisan key:generate” and add the generate key into the “.env” file as the “APP_KEY”.

If that doesn’t work, repeat with “php artisan key:generate --force”…

Let me know if that works?

Hi Folks,

I’m using the Centos 7 VMDK image provided and this morning I get the following error on the WWW page.

Error: Missing dependencies! Run the following command to fix:
./scripts/composer_wrapper.php install --no-dev

When, I run the specified command from terminal I also get:

Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

** Problem 1**
** - 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 2**
** - 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 3**
** - 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].**

If I try and install the ext-mbstring extension I get:

Error: php70w-common conflicts with php-common-5.4.16-45.el7.x86_64
** You could try using --skip-broken to work around the problem**
** You could try running: rpm -Va --nofiles --nodigest**

Any advice would be much appreciated.

EDIT: If I use the correct package I make more progress doh!

yum install php70w-mbstring

I can then run ./scripts/composer_wrapper.php install --no-dev

However I now get the following on the WWW page:

Missing PHP extensions. Please install and enable them on your LibreNMS server.
mbstring

A quick php --ini shows mbstring as being enabled:

[root@librenms librenms]# php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/bz2.ini,
/etc/php.d/calendar.ini,
/etc/php.d/ctype.ini,
/etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/exif.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/ftp.ini,
/etc/php.d/gd.ini,
/etc/php.d/gettext.ini,
/etc/php.d/gmp.ini,
/etc/php.d/iconv.ini,
/etc/php.d/json.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mcrypt.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/posix.ini,
/etc/php.d/shmop.ini,
/etc/php.d/simplexml.ini,
/etc/php.d/snmp.ini,
/etc/php.d/sockets.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/sysvmsg.ini,
/etc/php.d/sysvsem.ini,
/etc/php.d/sysvshm.ini,
/etc/php.d/tokenizer.ini,
/etc/php.d/xml.ini,
/etc/php.d/xml_wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini

LAST EDIT! - Working! a reboot was needed my bad.

2 Likes

hi,

app_key is set, but www still not working. Error without changes.

Just restarting the web service should suffice.

not for me… still Error: logs not writable!

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

systemctl enable httpd

systemctl start httpd
php -v
yum -y install epel-release
yum install php-erusev-parsedown

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

 cd /opt/librenms/

./validate.php
timedatectl set-timezone ${ZONE:-UTC}
yum -y install tzdata

yum install php-mbstring

It will help to solve this problem

##############################################################################33

[root@librenms librenms]# ./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
Package operations: 39 installs, 4 updates, 0 removals

  • Updating dapphp/radius (2.5.1 => 2.5.2): Downloading (100%)
  • Updating guzzlehttp/guzzle (6.3.0 => 6.3.2): Downloading (100%)
  • Updating symfony/yaml (v2.8.35 => v2.8.38): Downloading (100%)
  • Installing doctrine/inflector (v1.1.0): Downloading (100%)
  • Installing doctrine/instantiator (1.0.5): Downloading (100%)
  • Installing erusev/parsedown (1.7.1): Downloading (100%)
  • Installing jakub-onderka/php-console-color (0.1): Downloading (100%)
  • Installing symfony/polyfill-mbstring (v1.7.0): Downloading (100%)
  • Installing symfony/var-dumper (v3.4.8): Downloading (100%)
  • Installing psr/log (1.0.2): Downloading (100%)
  • Installing symfony/debug (v3.4.8): Downloading (100%)
  • Installing symfony/console (v3.4.8): Downloading (100%)
  • Installing nikic/php-parser (v3.1.5): Downloading (100%)
  • Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (100%)
  • Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
  • Installing psy/psysh (v0.8.18): Downloading (100%)
  • Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)
  • Installing symfony/css-selector (v3.4.8): Downloading (100%)
  • Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%)
  • Installing symfony/routing (v3.2.14): Downloading (100%)
  • Installing symfony/process (v3.4.8): Downloading (100%)
  • Installing paragonie/random_compat (v2.0.12): Downloading (100%)
  • Installing symfony/polyfill-php70 (v1.7.0): Downloading (100%)
  • Installing symfony/http-foundation (v3.4.8): Downloading (100%)
  • Updating symfony/event-dispatcher (v3.4.5 => v3.4.8): Downloading (100%)
  • Installing symfony/http-kernel (v3.4.8): Downloading (100%)
  • Installing symfony/finder (v3.4.8): Downloading (100%)
  • Installing swiftmailer/swiftmailer (v5.4.9): Downloading (100%)
  • Installing ramsey/uuid (3.7.3): Downloading (100%)
  • Installing symfony/translation (v3.2.14): Downloading (100%)
  • Installing nesbot/carbon (1.25.0): Downloading (100%)
  • Installing mtdowling/cron-expression (v1.2.1): Downloading (100%)
  • Installing monolog/monolog (1.23.0): Downloading (100%)
  • Installing league/flysystem (1.0.44): Downloading (100%)
  • Installing laravel/framework (v5.4.36): Downloading (100%)
  • Installing laravel/tinker (v1.0.5): Downloading (100%)
  • Installing laravel/laravel (v5.4.30): Downloading (100%)
  • Installing oriceon/toastr-5-laravel (dev-master 4ce3779): Cloning 4ce3779ba7
  • Installing webmozart/assert (1.3.0): Downloading (100%)
  • Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)
  • Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)
  • Installing phpdocumentor/reflection-docblock (3.3.2): Downloading (100%)
  • Installing phpunit/php-token-stream (1.4.12): Downloading (100%)
    Generating autoload files

LibreNMS\ComposerHelper::postInstall
setfacl -R -m g::rwx rrd/ logs/ storage/ bootstrap/cache/
setfacl -d -m g::rwx rrd/ logs/ storage/ bootstrap/cache/
php artisan key:generate
Application key [base64:irwK54lyCtR/YTiW/amL9XIWwzmpBkVyzvNnGosZJho=] set successfully.
Illuminate\Foundation\ComposerScripts::postInstall
php artisan optimize
Generating optimized class loader
The compiled services file has been removed.

now solved

Which in truth is what I did :slight_smile:

Steps that I used to fix it:

  • Updated all pending CentOS patches
  • yum install php-erusev-parsedown – which installed mbstring as a depedency
  • Rebooted
  • Switched to ‘librenms’ user
  • Finally ran: ./scripts/composer_wrapper.php install --no-dev

Everything was working fine after that.

3 Likes

Had this issue on Ubuntu 16.04 also. Steps I took to resolve:

  1. Pulled down latest updates and rebooted
  2. sudo apt install php-mbstring
  3. sudo su librenms
  4. ./opt/librenms/scripts/composer_wrapper.php install --no-dev

after installing php-mbstring the composer_wrapper script was able to run, no problem. Make sure you run it as librenms user.

4 Likes

Thanks! It’s the last day before a week of vacation and you just saved my afternoon. Much appreciated!

1 Like

I just came into work and see this and so glad I scrolled to the bottom, Great work Jodell22 Saved us here as well today.

I tried the:
./opt/librenms/scripts/composer_wrapper.php install --no-dev

it failed. So I did the yum update since it was my chance to catch up, rebooted, ran the command again. I got the ext-mbstring error listed by others above. I did yum install php70w-mbstring and rebooted. Now it works.

Thanks to everyone above for the help. much love for you all

Additionally, I had to install php-xml to get composer_wrapper.php to complete.

otherwise, successful fix.

1 Like