-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when setting up database #146
Comments
@jslegers73 Thank you for the report. A new version (23.10) containing a fix will be released shortly. In the meantime, you may call the proper command directly: |
@jarischaefer I will try the new version tonight. |
@jarischaefer I get another error now. I have deleted the data directory form MariaDB. pi@rpi-test:~/docker-data $ docker exec LibreNMS setup_database In Connection.php line 795: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.cache_l In Connection.php line 601: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.cache_l pi@rpi-test:~/docker-data $ Tried it also on a fresh installation same issue unfortunately. |
I believe that some state is still present, otherwise database migrations would have created fresh tables prior to using the cache. Did you really fully remove both the container and its directories ( I will create a new helper script for setting up a fresh database in such scenarios. In the meantime, use the following command: |
@jslegers73 Try |
@jarischaefer Hi sorry for my late reply. Sorry to say but I have tried it again but again same error on fresh installed 64 Bit RPI 4 pi@rpi-test:~/docker-data $ docker exec LibreNMS setup_database In Connection.php line 795: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.cache_l In Connection.php line 601: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.cache_l pi@rpi-test:~/docker-data $ I use the mariadb docker container. docker pull mariadb This is how I have setup the database: This should work with the original MariaDB right? When I try your work around looks like it is working: And when I want to create an Admin I get the following error: Sorry for this. I hope you can fix it. |
I did some testing. Found out that image version 23.8.2 works ok. I have to create the database with option : /sbin/setuser librenms /opt/librenms/artisan migrate:fresh. If I use the docker exec LibreNMS setup_database command I get the following error.
But I can create the admin account and login. So that works. 23.9 and 23.10 I can't get to work. Also not on an AMD64 machine. Hopefully this will help you. |
@jslegers73 Sorry for the delay, please try version 24.1.0, or use |
Hi was on holiday. I have tested it and it works thank you. |
Hi,
When I want to setup the database with command docker exec LibreNMS setup_database. I get the following error.
docker exec LibreNMS setup_database
Could not open input file: /opt/librenms/includes/sql-schema/update.php
When I check in the container the directory isn't there also :
root@librenms:/usr/local/bin# ./setup_database
Could not open input file: /opt/librenms/includes/sql-schema/update.php
root@librenms:/usr/local/bin# cd /opt/librenms/includes/
root@librenms:/opt/librenms/includes# ls
caches discovery init.php services.inc.php systemd-shared.inc.php
common.php functions.php polling snmp.inc.php
datastore.inc.php helpers.php port-descr-parser.inc.php snmptrap.inc.php
dbFacile.php html rewrites.php static-config.php
definitions include-dir.inc.php services syslog.php
root@librenms:/opt/librenms/includes#
Is this a know issue or am I doing something wrong?
This is my docker-compose file :
mariadb:
image: mariadb
container_name: MariaDB
restart: always
hostname: mariadb
environment:
- TZ=${TZ}
- MYSQL_ROOT_PASSWORD=${MDBRP}
volumes:
- ./mariadb:/var/lib/mysql
- ./mariadb.cnf:/etc/mysql/conf.d/custom.cnf
librenms:
image: jarischaefer/docker-librenms:latest-arm64v8
container_name: LibreNMS
restart: always
hostname: librenms
ports:
- 8668:80
volumes:
- ./librenms/logs:/opt/librenms/logs
- ./librenms/rrd:/opt/librenms/rrd
- ./librenms/custom.config.php:/opt/librenms/conf.d/custom.config.php:ro
environment:
- APP_KEY=base64:J1VABAqbGIZAMZA40ogtOJwTWfI91xr4KB53Vlxbsl4=
- DB_HOST=mariadb
- DB_NAME=librenms
- DB_USER=librenms
- DB_PASS='V#aCitVKB!YzSC3G1x'
- BASE_URL=http://librenms.thuisjsl.local:8668
- DISABLE_IPV6=true
depends_on:
- mariadb
links:
- mariadb:librenms
The text was updated successfully, but these errors were encountered: