ImportSource.php: Trying to access array offset on value of type null

Hi guys,

I try to migrate some import source objects from one DEV-system to my brand new Icinga2.

When I import a basket or even the json-file I exported with “icingacli director export importsources > import-sources.json” my new Icinga2 throws me the error:

cat import-sources.json | icingacli director import importsources
ERROR: ErrorException in /mnt/clusterres/usr_share/icingaweb2/modules/director/library/Director/Objects/ImportSource.php:129 with message: Trying to access array offset on value of type null

The json file looks fine for me (this is only one import source!)

{
“ImportSource”: {
“Hosts - Company Active Directory / DE / Inray”: {
“description”: “Description”,
“key_column”: “dnshostname”,
“modifiers”: [
{
“description”: “Description”,
“priority”: “1”,
“property_name”: “cn”,
“provider_class”: “Icinga\Module\Director\PropertyModifier\PropertyModifierLowercase”,
“settings”: {},
“target_property”: “Description”
},
{
“description”: “Description”,
“priority”: “2”,
“property_name”: “objectsid”,
“provider_class”: “Icinga\Module\Director\PropertyModifier\PropertyModifierFromAdSid”,
“settings”: {},
“target_property”: “Description”
},
{
“description”: “Description”,
“priority”: “3”,
“property_name”: “operatingsystemversion”,
“provider_class”: “Icinga\Module\Director\PropertyModifier\PropertyModifierRegexReplace”,
“settings”: {
“pattern”: “/^(\d+\.\d+)\s\((\d+)\)$/”,
“replacement”: “\1.\2”
},
“target_property”: “Description”
},
{
“description”: “Description”,
“priority”: “4”,
“property_name”: “dnshostname”,
“provider_class”: “Icinga\Module\Director\PropertyModifier\PropertyModifierGetHostByName”,
“settings”: {
“on_failure”: “keep”,
“record_type”: “A”
},
“target_property”: “address”
},
{
“description”: “Description”,
“priority”: “5”,
“property_name”: “dnshostname”,
“provider_class”: “Icinga\Module\Director\PropertyModifier\PropertyModifierRegexReplace”,
“settings”: {
“pattern”: “/-SR-\d\d\d\d.company.local/”,
“replacement”: “”
},
“target_property”: “site”
}
],
“originalId”: “2”,
“provider_class”: “Icinga\Module\Director\Import\ImportSourceLdap”,
“settings”: {
“base”: “OU=inray,OU=Servers,OU=Computers,OU=DE, OU=COMPANY,DC=company,DC=local”,
“filter”: “operatingsystem=server”,
“objectclass”: “computer”,
“query”: “dn, dnshostname, cn,operatingsystem, operatingsystemversion, objectsid, sAMAccountName,description”,
“resource”: “icingaweb_ldap”
},
“source_name”: “Hosts - Company Active Directory / DE / Inray”
}

}

}

I did some google research and maybe this is related to the PHP 7.4 I am using.

This are the versions I use on the new Icinga2:

CentOS Linux release 8.2.2004 (Core)
PHP 7.4.12 (cli)
icinga2-2.12.1-1.el8.icinga.x86_64
Icinga director: 1.7.2

does anyone also had this error?

Any help appreciated.

Best regards
Volker