Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

21.10 : Export des fichiers de configuration - Problème #10828

Open
ptitpopey opened this issue Mar 8, 2022 · 3 comments
Open

21.10 : Export des fichiers de configuration - Problème #10828

ptitpopey opened this issue Mar 8, 2022 · 3 comments
Labels
status/new New tickets

Comments

@ptitpopey
Copy link

Bonjour à tous,

Suite migration 21.04 vers 21.10, impossible de recharger le poller distant.

CentOS Linux release 7.9.2009 (Core)

PHP 8.0.16 (cli) (built: Feb 15 2022 21:34:32) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.16, Copyright (c) Zend Technologies
with SourceGuardian v12.1.0, Copyright (c) 2000-2021, by SourceGuardian Ltd.

Erreur :
tail -f /var/log/php-fpm/centreon-error.log
[08-Mar-2022 15:10:10 Europe/Paris] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/share/centreon/www/class/config-generate/service.class.php:295
Stack trace:
#0 /usr/share/centreon/www/class/config-generate/service.class.php(387): Service->manageVerticalInheritance()
#1 /usr/share/centreon/www/class/config-generate/service.class.php(569): Service->manageNotificationInheritance()
#2 /usr/share/centreon/www/class/config-generate/host.class.php(113): Service->generateFromServiceId()
#3 /usr/share/centreon/www/class/config-generate/host.class.php(479): Host->getServices()
#4 /usr/share/centreon/www/class/config-generate/host.class.php(497): Host->generateFromHostId()
#5 /usr/share/centreon/www/class/config-generate/generate.class.php(257): Host->generateFromPollerId()
#6 /usr/share/centreon/www/class/config-generate/generate.class.php(290): Generate->configPoller()
#7 /usr/share/centreon/www/include/configuration/configGenerate/xml/generateFiles.php(161): Generate->configPollerFromId()
#8 {main}
thrown in /usr/share/centreon/www/class/config-generate/service.class.php on line 295

Cela reste bloqué :
image

@ptitpopey ptitpopey added the status/new New tickets label Mar 8, 2022
@ptitpopey
Copy link
Author

Problème provenant du code suivant

           if (count($servicesTpl[$serviceId][$attribute . '_cache']) > 0) {
                $computedCache = array_merge($computedCache, $servicesTpl[$serviceId][$attribute . '_cache']);
                if (is_null($servicesTpl[$serviceId][$attributeAdditive])
                    || $servicesTpl[$serviceId][$attributeAdditive] != 1) {
                    break;
                }
            }

@TomT63
Copy link

TomT63 commented Mar 14, 2022

Bonjour,

J'ai eu le même problème la solution a été de réactiver les groupes d'hôtes qui étaient désactivés.
Après ça l'export a fonctionné.

Cordialement.

@ptitpopey
Copy link
Author

Problème sur les groupes de services champ groupe de contact. Saisie d'un groupe de contact dasn chaque groupe de service puis suppression des groupes de contact dans les groupes de services

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/new New tickets
Projects
None yet
Development

No branches or pull requests

2 participants