API Import fails with deprecated

I am using a fresh Icinga2 installation r2.13.5-1 on Ubuntu 22.04, Icinga Web2 Version 2.11.1, php 8.1.2, director Master, incubator 0.17.0.

When i try to run the kickstart wizard after enabling director + setting ressources, i cannot complete kickstart wizard.

This message appears once:

Storing director_activity_log[] failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘0x’ in ‘field list’, query was: INSERT INTO director_activity_log (object_name, action_name, object_type, old_properties, new_properties, author, change_time, checksum, parent_checksum) VALUES (?, ?, ?, ?, ?, ?, ?, 0x7c97c2352d40ca58e5bd9ec08160e5ccbd355453, 0x) {array ( ‘id’ => NULL, ‘object_name’ => ‘director-global’, ‘action_name’ => ‘create’, ‘object_type’ => ‘icinga_zone’, ‘old_properties’ => NULL, ‘new_properties’ => ‘{“is_global”:true,“object_name”:“director-global”,“object_type”:“external_object”}’, ‘author’ => ‘ralf’, ‘change_time’ => ‘2022-08-16 15:52:28’, ‘checksum’ => ‘|��5-@�X彞��`�̽5TS’, ‘parent_checksum’ => NULL, )} (DbObject.php:934)

and lateron multiple times:

: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in
on line

Any idea what goes wrong and how to bring the API up?

Hi Ralf,

I just spend some hours doing a clean install on a new Ubuntu 22.04 server as well and ran into the exact same problem.
Were you able to find a solution to this issue already?

I think this might be a problem with the utf8 charset on the database, but I don’t know enough about director to fix it myself.

Well, I managed to fix the issue.

First, I reinstalled the director module (though I think this was not necessary).
Then, I created a new empty database for director and I did not use “utf8” as charset, but “UTF8MB4” instead. In the MySQL Version we both are using, “utf8” is short for “UTF8MB3”, not MB4.
Using this new database with the correct charset, the rest of the setup worked fine.

However, when trying to deploy my first agent, I ran into the error message “A ticket for this agent could not have been requested from your deployment endpoint: Ticket salt is not configured in ApiListener object”.

This one I could solve by running “icinga2 node wizard” as detailed here: Documentation

Hope this helps you (or someone else with enough google-fu) encountering this error as well.