Create Director DB Scheme fail

Hello all,

i´ve got the problem that the Director scheme creation fails.
My DB-System consists of a 3 Node Mariadb Galera-Cluster and 2 Proxysql-Nodes.
I´ve set the mysql-wait_timeout to 300 and the mysql-threshold_query_length to 1073741824, but the problem still exists.
The director creates 100 tables in the database.

  • Migration 0 failed (SQLSTATE[HY000]: General error: 2006 MySQL server has gone away) while running CREATE TABLE icinga_scheduled_downtime ( id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL, uuid VARBINARY(16) NOT NULL, object_name VARCHAR(255) NOT NULL, zone_id INT(10) UNSIGNED DEFAULT NULL, object_type ENUM(‘object’, ‘template’, ‘apply’) NOT NULL, disabled ENUM(‘y’, ‘n’) NOT NULL DEFAULT ‘n’, apply_to ENUM(‘host’, ‘service’) DEFAULT NULL, assign_filter TEXT DEFAULT NULL, author VARCHAR(255) DEFAULT NULL, comment TEXT DEFAULT NULL, fixed ENUM(‘y’, ‘n’) DEFAULT NULL, duration INT(10) UNSIGNED DEFAULT NULL, with_services ENUM(‘y’, ‘n’) NULL DEFAULT NULL, PRIMARY KEY (id), UNIQUE INDEX uuid (uuid), UNIQUE INDEX object_name (object_name), CONSTRAINT icinga_scheduled_downtime_zone FOREIGN KEY zone (zone_id) REFERENCES icinga_zone (id) ON DELETE RESTRICT ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 (Migration.php:60)
  • Director version (System - About): 1.9.1
  • Icinga Web 2 version and modules (System - About): 2.11.1
  • Icinga 2 version (icinga2 --version): r2.13.5-1
  • Operating System and version: Debian 11
  • Webserver, PHP versions: PHP Version 7.4.30, icingadb: 1.0.1

Short edit:
I´ve tried to import the mysql.sql manually (mysql -h -u director -D director < mysql.sql -p) and got the following error:

ERROR 1060 (42S21) at line 2312: Duplicate column name ‘imports’

I´ve also copied the commands from the file and just pasted it in mariadb. This works, but the director is not functional at all.

I´ve installed the newest version of the director today (1.10.0) and used these settings (Galera MySQL cluster with VIPs and HAProxy for IDO-Mysql and more). And i also configured the Database directly as resource (so without Proxysql).

I´m really thankful for every hint.

Best Regards

I´ve installed mariadb on my web-server and it still won´t work. I get the following error now:

There is a duplicate line in mysql.sql causing this problem.

I reported the problem this morning and it was fixed few minutes later. So getting the updated file from github and give it another try should do the job. Maybe you want to delete already created tables in your director DB first.

1 Like

@4L60 helped me on a fresh installation! Thanks.