Question

Export configuration to poller stuck on generating files

  • 5 April 2023
  • 1 reply
  • 313 views

Badge +3

We have this problem, when trying to synchronize configuration to poller

at every attempt, PHP reports this error

[05-Apr-2023 14:32:26 Europe/Paris] PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /usr/share/centreon/www/class/config-generate/host.class.php:429
Stack trace:
#0 /usr/share/centreon/www/class/config-generate/host.class.php(429): array_merge()
#1 /usr/share/centreon/www/class/config-generate/host.class.php(475): Host->getSeverity()
#2 /usr/share/centreon/www/class/config-generate/host.class.php(497): Host->generateFromHostId()
#3 /usr/share/centreon/www/class/config-generate/generate.class.php(257): Host->generateFromPollerId()
#4 /usr/share/centreon/www/class/config-generate/generate.class.php(290): Generate->configPoller()
#5 /usr/share/centreon/www/include/configuration/configGenerate/xml/generateFiles.php(161): Generate->configPollerFromId()
#6 {main}
thrown in /usr/share/centreon/www/class/config-generate/host.class.php on line 429

As far as I understood, there is null object received from the database instead of an array

I found this post, https://support.centreon.com/hc/en-us/articles/13574650726673--Configuration-Files-Export-Blocked
I
tried the sql requests mentioned:

SELECT * from hostgroup_relation where hostgroup_hg_id IN (select hg_id from hostgroup where hg_activate != '1');SELECT * from hostgroup_relation where hostgroup_hg_id IN (select hg_id from hostgroup where hg_activate != '1');SELECT service_template_model_stm_id from service where service_register = '1' and service_activate = '1' and service_template_model_stm_id in (select service_id from service where service_register = '0' and service_activate = '0');SELECT host_id from host join host_template_relation htr ON host.host_id = htr.host_tpl_id where host_register = '0' and host_activate = '0' and htr.host_host_id in (select host_id from host where host_register = '1' and host_activate = '1');

but all of them, return no results
so is there any sql requests, that I could use to identify what is the null object returned to PHP?


1 reply

Badge +2

Hi WadOps,

Reading your post, it vaguely reminds me of a similar issue I encountered when I wanted to export some configuration while having a disabled business activity (BAM extension).

I'm not sure if this will help you since your case may be different, but try to check if it's related to disabled objects in your configuration.

Reply