Unable to access the WebUI

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

Thank you - it worked like a charm on CentOS 7.

Thanks!

1 Like

this works for me, THANKS !!

1 Like

Additionally, I had to install php7.0-xml and php7.0-mbstring to get composer_wrapper.php to complete.

I had to do this for Ubuntu as well.

I’m still unable to access the webUI. I get the following.

Error: bootstrap/cache, storage, storage/framework/sessions, storage/framework/views, storage/framework/cache, logs not writable! Run these commands as root on your LibreNMS server to fix:

chown -R librenms:librenms /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs

setfacl -R -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs

setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs

I’ve run the commands recommended above and that didn’t help. I’ve tried the suggestions in this thread and that didn’t help. I don’t have SELinux running on this box. This was working up until yesterday, and I suspect it broke with a daily.sh update. Anybody have any thoughts?

librenms@cerento010:~$ /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
Generating optimized class loader
The compiled services file has been removed.
librenms@cerento010:~$ ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updated from 5fd81db81 to 824ce313f OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
librenms@cerento010:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 1.39-41-g824ce313f
DB Schema | 249
PHP | 7.0.27-0+deb9u1
MySQL | 10.1.26-MariaDB-0+deb9u1
RRDTool | 1.6.0
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

theredon - What does ./validate.php say?

Everything looks good.

Any news thereden?

I’m on a Virtual CentOs install. I can no longer access the webui; I get the following like many in here:
Error: bootstrap/cache, storage, storage/framework/sessions, storage/framework/views, storage/framework/cache not writable! Run these commands as root on your LibreNMS server to fix:
chown -R librenms:librenms /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache
setfacl -R -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache
setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

Commands don’t do anything. My validate.php complains about a time not being set in php. ====================================

Component Version
LibreNMS 1.39-46-g7f4566a
DB Schema 249
PHP 7.1.16
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Missing optional PHP extension: posix
[FIX] It is suggested you install php-process or the one that matches your php version
[FAIL] You have no timezone set for php.
[FIX] http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
[FAIL] Discovery has not completed in the last 24 hours.
[FIX] Check the cron job to make sure it is running and using discovery-wrapper.py
[FAIL] You need to run this script as root or librenms

I’m stumped 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/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/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

I’m so stuck. I do have yesterdays snapshot where it all worked still but I don’t want to stop the Cron job.

PS I’m a giant MORON got it working. Sometimes I can’t believe how dumb I am! Thanks for reading either way!

Congrats on getting yours working. I’m still dead in the water here. Everything I can see is correct but I’m still getting the page stating that it can’t write to the logs, even though all the permissions are correct. I don’t know how many times I’ve run the chown command now, hoping that this time it might fix it.