Unable to access the WebUI

Tried restarting your web server and / or php-fpm?

I’m in the same boat as you man…running CentOS7 and keep getting the message about the permissions.

I have, still telling me it can’t write to the logs file.

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

drwxrwxr-x 2 librenms librenms 4096 Jan 12 10:45 logs/

I thought that it could possibly be due to something with the remote pollers not having the mbstring module so I jumped into those and updated and fixed that issue but I’m still seeing the same thing. I’m at a loss at this point.

@theredon

Can you show the structure inside that folder, run:

ls -li /opt/librenms/logs

librenms@cerento010:~$ ls -li /opt/librenms/logs/
total 219108
277652 -rw-r–r-- 1 librenms librenms 121007 May 15 00:17 daily.log
277584 -rw-r–r-- 1 librenms librenms 224203498 May 15 08:49 librenms.log

You have different file permissions to me,

Try this

chmod 664 /opt/librenms/logs/librenms.log

also your librenms log file is 224 MB, although probably not related you could try clearing it anyway
echo "" > /opt/librenms/logs/librenms.log

1 Like

OUTSTANDING!!! Much appreciated Chas!!

1 Like

Please Assist.
I am running Librenms on ubuntu
i have ran the composer and the key generator but nothing seems to work.
Am still getting the error below after putting username and password in Web Gui.

below is the result of ./validate.php

root@libresvr:/opt/librenms# ./validate.php

Component Version
LibreNMS 1.43-70-g9aa429c8d
DB Schema 267
PHP 7.0.30-0ubuntu0.16.04.1
MySQL 10.3.8-MariaDB-1:10.3.8+maria~xenial
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

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

paste librenms.log errors, did you check other recent threads ? this one is old

Just for kicks: (Quoting TheGreatDoc)

Try: chown -R librenms:librenms /opt/librenms setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

1 Like

Proper formatting of the commands^:

chown -R librenms:librenms /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

Thanks Zach.
This worked perfectly well

running CentOS7

On 18th Sept Use OVA File and start Librenms works perfect for yesterday but today morning facing issue on webUI :

Error: Missing dependencies! Run the following command to fix:

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

Executive following cmd : [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
- The requested PHP extension ext-mysqlnd * is missing from your system. Install or enable PHP’s mysqlnd extension.
Problem 2
- The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP’s mbstring extension.
Problem 3
- 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 4
- 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 5
- laravel/framework v5.4.36 requires ext-mbstring * → the requested PHP extension mbstring is missing from your system.
- wpb/string-blade-compiler 3.4.x-dev requires laravel/framework 5.4.* → satisfiable by laravel/framework[v5.4.36].
- Installation request for wpb/string-blade-compiler 3.4.x-dev → satisfiable by wpb/string-blade-compiler[3.4.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php.ini
- /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/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
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

validate
Also check as foum with validate.php cmd : [librenms@librenms ~]$ ./validate.php

Component Version
LibreNMS 1.43-92-ge81a1fc
DB Schema ?
PHP 7.0.9
MySQL ?
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Composer Version: 1.7.2
[OK] Dependencies up-to-date.
[FAIL] Error connecting to your database.
[FAIL] Missing PHP extension: mysqlnd
[FIX] Please install mysqlnd
[FAIL] Missing PHP extension: mbstring
[FIX] Please install mbstring
[WARN] Could not check poller/discovery, db is not connected.
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX] sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

    Files:
     /opt/librenms/html/plugins/Weathermap/configs
     /opt/librenms/html/plugins/Weathermap/configs/testing.conf

structure inside that folder
[librenms@librenms ~]$ ls -li /opt/librenms/logs
total 1308
911442 -rw-r–r–. 1 nginx librenms 1192668 Sep 19 04:13 access_log
13729 -rw-rw-r-- 1 librenms librenms 5186 Sep 19 00:17 daily.log
911443 -rw-r–r–. 1 nginx librenms 56315 Jul 31 2016 error_log
528826 -rw-rw-r–. 1 librenms librenms 64269 Sep 19 00:15 librenms.log

what should i do…

yum install php70w-mbstring
yum swap php70w-mysql php70-mysqlnd
./daily.sh
./validate.php

[root@librenms librenms]# yum swap php70w-mysql php70-mysqlnd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: centos.mirror.snu.edu.in
  • epel: mirror01.idc.hinet.net
  • extras: centos.mirror.snu.edu.in
  • updates: centos.mirror.snu.edu.in
  • webtatic: uk.repo.webtatic.com
    No package php70-mysqlnd available.
    Error: swap install php70-mysqlnd

yum list installed | grep “php”

Nevermind, I typoed, it should be:
yum swap php70w-mysql php70w-mysqlnd

1 Like

After Executive given your cmd it’s working
yum install php70w-mbstring
yum swap php70w-mysql php70w-mysqlnd
./scripts/composer_wrapper.php install --no-dev
./daily.sh
./validate.php

thank you thank you …Now This worked perfectly well

Thanks jodell22 !!