Closed dirkey closed 1 year ago
I have the same problem just with pgsql, the problem is a path mismatch.
/usr/share/icingaweb2/etc/schema/mysql.schema.sql <- wrong, must be /usr/share/icingaweb2/schema/mysql.schema.sql
The problem comes from the icingaweb2 Container File: /entrypoint-db-init/application/clicommands/DbCommand.php
Line 59: ->get('schema', 'path', Icinga::app()->getBaseDir('etc/schema')) . "/{$db->dbType}.schema.sql"
I copied the file our of the container, removed the etc/ from getBaseDir an it worked.
After that was fixed you will get another error with permission denied from apache /var/log/apache2/error.log.
New incinga web image is working!
If I deploy the docker-compose file, icinga web will be exit with error code 1. It seems there is the schema file missing:
icingaweb_1 | [Sun Jan 29 12:40:41.274446306 2023] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql" icingaweb_1 | [Sun Jan 29 12:40:41.320286678 2023] [docker_entrypoint:debug] [pid 1] DOCKERE: Importing schema into database resource "icingaweb-mysql" icingaweb_1 | ERROR: RuntimeException in /usr/share/icingaweb2/library/Icinga/Util/File.php:39 with message: SplFileObject::__construct(/usr/share/icingaweb2/etc/schema/mysql.schema.sql): failed to open stream: No such file or directory icingaweb_1 | [Sun Jan 29 12:40:41.365987191 2023] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1