Updated Librenms VM, now cant access WebUI

After updating my Librenms Ubuntu VM, I now cannot access the WebUI. Chrome just says “this page is not available”.
I ran ./validate.php and get this:

librenms@librenms:~$ ./validate.php
PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /opt/librenms/validate.php on line 164
====================================
Component | Version
--------- | -------
LibreNMS | 1.36-35-g26ce852
DB Schema | ?
PHP | 7.0.22-0ubuntu0.16.04.1
MySQL | ?
RRDTool | 1.5.5
SNMP | NET-SNMP 5.7.3
====================================

[FAIL] Missing dependencies! [FIX] composer install --no-dev
ezyang/htmlpurifier
guzzlehttp/promises
psr/http-message
guzzlehttp/psr7
symfony/event-dispatcher
guzzlehttp/guzzle
influxdb/influxdb-php
slim/slim
palanik/corsslim
pear/console_color2
and 8 more…

Any advice would be appreciated. Thanks…

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

That did it. Thanks!

Hi, am facing the same problem but cant seem to be able to run the recommended command;

root@Ubuntu-srv02:~# run ./scripts/composer_wrapper.php install --no-dev
No command ‘run’ found, did you mean:
Command ‘runc’ from package ‘runc’ (universe)
Command ‘rn’ from package ‘trn4’ (multiverse)
Command ‘rn’ from package ‘trn’ (multiverse)
Command ‘rup’ from package ‘rstat-client’ (universe)
Command ‘qrun’ from package ‘torque-client’ (universe)
Command ‘qrun’ from package ‘torque-client-x11’ (universe)
Command ‘zrun’ from package ‘moreutils’ (universe)
Command ‘srun’ from package ‘slurm-client’ (universe)
Command ‘grun’ from package ‘grun’ (universe)
Command ‘runq’ from package ‘sendmail-bin’ (universe)
Command ‘runq’ from package ‘exim4-daemon-light’ (main)
Command ‘runq’ from package ‘exim4-daemon-heavy’ (main)
run: command not found

Please help

run the script from inside of /opt/librenms

1 Like

Or indeed drop the initial “run” from your command… Not

root@Ubuntu-srv02:~# run ./scripts/composer_wrapper.php install --no-dev

but

root@Ubuntu-srv02:~# ./scripts/composer_wrapper.php install --no-dev

Thanks!!

running the script from /opt/librenms has worked and am up and running!

Finding this NMS really awesome…!!

I’m getting this error please help

[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: the “/home/airjaldi/.composer/cache” directory used to download the temp file could not be written

self-update [-r|–rollback] [–clean-backups] [–no-progress] [–update-keys] [–stable] [–preview] [–snapshot] [–set-channel-only] [–] []

Cannot create cache directory /home/airjaldi/.composer/cache/repo/https—packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/airjaldi/.composer/cache/files/, or directory is not writable. Proceeding without cache

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/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/15-xml.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-dom.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-simplexml.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
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
- /etc/php/7.0/cli/conf.d/20-zip.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

yust:
apt-get install php-mbstring
su - librenms

as user librenms

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

3 Likes

Same as above!! Cannot fix using the suggested method!
Please HELP - this is a great NMS !!

Steve

apt install php-mbstring

or:

yum install php-mbstring

Then:

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

1 Like

Hi,
first try to install (again) required packages from https://docs.librenms.org/#Installation/Installation-Ubuntu-1604-Nginx/ 2
then run ./scripts/composer_wrapper.php install --no-dev

P.S.
my steps:
584 apt install composer fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php7.0-cli php7.0-curl php7.0-fpm php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-snmp php7.0-xml php7.0-zip python-memcache python-mysqldb rrdtool snmp snmpd whois
585 ./scripts/composer_wrapper.php install --no-dev
586 chown -R librenms:librenms /opt/librenms

Hi,

I resolved the same problem with this commands:
1 - Update your system and repository
#yum update

2 - check your version of php
#php -v
* In my case the version was php70 so I search for the mbstring dependency of this version
#yum search php7
#yum install php70w-mbstring.x86_64

3 - run the script to update the dependencies for librenms
#/opt/librenms/scripts/composer_wrapper.php install --no-dev

4 - restart the httpd service to restart the php
#systemctl restart httpd.service

1 Like

/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!