jarischaefer / docker-librenms

Docker image for LibreNMS
MIT License
115 stars 38 forks source link

Multiple problems #108

Closed TonBon closed 4 years ago

TonBon commented 5 years ago

Hello :+1:

I am probably reporting this in the wrong place, but I don't know where else I should report it.

I am running your container on my Synology and am discovering it (thank you for your hard work for the community!).

I just managed to find out how to execute validate.php, and it runs into a number problems:

root@jarischaefer-docker-librenms3a:/opt/librenms# ./validate.php

Component Version
LibreNMS 1.54
DB Schema 2019_07_03_132417_create_mpls_saps_table (139)
PHP 7.3.5-1+ubuntu18.04.1+deb.sury.org+1
MySQL 5.5.62-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.9.0 [OK] Dependencies up-to-date. [OK] Database connection successful [FAIL] Time between this server and the mysql database is off Mysql time 2019-08-20 23:19:08 PHP time 2019-08-20 21:19:08

[FAIL] Database: missing index (sensors_to_state_indexes/state_index_id) [FAIL] Database: extra index (sensors_to_state_indexes/sensors_to_state_indexes_ibfk_1) [FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd): [FIX]: Run the following SQL statements to fix. SQL Statements: ALTER TABLE sensors_to_state_indexes DROP INDEX sensors_to_state_indexes_ibfk_1; ALTER TABLE sensors_to_state_indexes ADD INDEX state_index_id (state_index_id); [FAIL] You have a different system timezone (CEST) than the php configured timezone (UTC) [FIX]: Please correct either your system timezone or your timezone set in php.ini. bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) [WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices. bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) [WARN] Your install is over 24 hours out of date, last update: Mon, 29 Jul 2019 02:47:34 +0000 [FIX]: Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors. [WARN] Your local git branch is not master, this will prevent automatic updates. [FIX]: You can switch back to master with git checkout master [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/composer.phar

When I try to do:

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

I get:

setfacl: /opt/librenms/rrd: Operation not supported setfacl: /opt/librenms/logs: Operation not supported setfacl: /opt/librenms/bootstrap/cache/: Operation not supported setfacl: /opt/librenms/storage/: Operation not supported

As for the MySQL/MariaDB container: I can't even seem to login; -u root -p synology (which is what is shown in the details of the MariaDB container in the Docker app in Synology) doesn't even allow me to log in.

I am completely stuck and lost, could you perhaps help me?

Thank you very much!

Bye,

jarischaefer commented 5 years ago

Sorry, I am currently busy (abroad) and will get back to you in a couple of weeks probably.

jarischaefer commented 5 years ago

[FAIL] Database: missing index (sensors_to_state_indexes/state_index_id) [FAIL] Database: extra index (sensors_to_state_indexes/sensors_to_state_indexes_ibfk_1) [FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd):

Try passing -e DAILY_ON_STARTUP=true to fix the database schema (see https://github.com/jarischaefer/docker-librenms#automatic-database-updates-potentially-unsafe) during the next restart.

setfacl: /opt/librenms/rrd: Operation not supported setfacl: /opt/librenms/logs: Operation not supported setfacl: /opt/librenms/bootstrap/cache/: Operation not supported setfacl: /opt/librenms/storage/: Operation not supported

What kind of filesystem are you running? Perhaps you need additional mount options for ACLs to work. Are you facing any issues? It might be safe to ignore these warnings.

[FAIL] You have a different system timezone (CEST) than the php configured timezone (UTC)

Try passing the timezone (e.g. -e TZ=Europe/Zurich) and completely removing the container (see https://github.com/jarischaefer/docker-librenms/issues/107#issuecomment-521384216) before you restart.

As for the MySQL/MariaDB container: I can't even seem to login; -u root -p synology (which is what is shown in the details of the MariaDB container in the Docker app in Synology) doesn't even allow me to log in.

Are you connecting from the host? Try entering the container (docker exec -it mariadb bash) and connecting from inside the container. MariaDB does not allow TCP connections for users that are restricted to localhost (localhost means Unix socket only, you have to use either 127.0.0.1 or %).

TonBon commented 5 years ago

Thank you :-)

[FAIL] Database: missing index (sensors_to_state_indexes/state_index_id) [FAIL] Database: extra index (sensors_to_state_indexes/sensors_to_state_indexes_ibfk_1) [FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd):

Try passing -e DAILY_ON_STARTUP=true to fix the database schema (see https://github.com/jarischaefer/docker-librenms#automatic-database-updates-potentially-unsafe) during the next restart.

I have it fixed.

setfacl: /opt/librenms/rrd: Operation not supported setfacl: /opt/librenms/logs: Operation not supported setfacl: /opt/librenms/bootstrap/cache/: Operation not supported setfacl: /opt/librenms/storage/: Operation not supported

What kind of filesystem are you running? Perhaps you need additional mount options for ACLs to work. Are you facing any issues? It might be safe to ignore these warnings.

It's running in Docker on Synology, so it uses Linux (Busybox).

[FAIL] You have a different system timezone (CEST) than the php configured timezone (UTC)

Try passing the timezone (e.g. -e TZ=Europe/Zurich) and completely removing the container (see #107 (comment)) before you restart.

Fixed

As for the MySQL/MariaDB container: I can't even seem to login; -u root -p synology (which is what is shown in the details of the MariaDB container in the Docker app in Synology) doesn't even allow me to log in.

Are you connecting from the host? Try entering the container (docker exec -it mariadb bash) and connecting from inside the container. MariaDB does not allow TCP connections for users that are restricted to localhost (localhost means Unix socket only, you have to use either 127.0.0.1 or %).

That didn't work :-)

But this did: docker exec -it mariadb mysql -u root

I didn't have to enter any password, even 'though mariadb has a root password.