Skip to main content

Hi all !

i encountered this probleme since yesterday after reinstalled the auto-discovery module !

The job work and found somes hosts:

 but Impossible to see the resultat and that appear when i try:

Discovery Job for ESX hosts

i don’t have any idea about this….can u help me?

Do you have error in /var/log/php-fpm/centreon-error.log when you try to access to job result?


hi ​@Laurent i’m using Debian 12, i don’t have this path :

in log directory

When i see in php8.2-fpm.log i got this:

all is fine

When i see in /var/log:centreon/centreon-web.log i got this:

 and when i see in /var/log/apache2/error.log

 


Can you copy in raw text the line in “/var/log/apache2/error.log”?


[Wed Jan 08 14:32:19.091456 2025] [proxy_fcgi:error] [pid 1449:tid 1449] [client 10.79.11.147:45135] AH01071: Got error 'PHP message: [2025-01-08T14:32:19+0100] [critical] Error when searching for discovered hosts {"context":"[object] (CentreonAutoDiscovery\\\\Domain\\\\Job\\\\Exception\\\\JobException(code: 0): Error when searching for discovered hosts at /usr/share/centreon/src/CentreonAutoDiscovery/Domain/Job/Exception/JobException.php:0)\\n[previous exception] [object] (UnexpectedValueException(code: 0): The stream or file \\"/var/log/centreon/centreon-web.log\\" could not be opened in append mode: chmod(): Op\xc3\xa9ration non permise\\nThe exception occurred while attempting to log: [CentreonAutoDiscovery\\\\Domain\\\\Job\\\\UseCase\\\\FindDiscoveredHosts\\\\V21_10\\\\FindDiscoveredHosts:0]: Engine configuration not found\\nContext: {\\"monitoring_server_id\\":1} at /usr/share/centreon/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:140)"}\n', referer: http://10.79.10.71/centreon/configuration/hosts/discovery/jobs/1?providerId=1


hi ​@Laurent see the line :


Hi ​@tsuko it look like you have 2 errors.

The first one is about the right for Apache (www-data) to write error in /var/log/centreon/centreon-web.log

If the file exists can you execute following commands:

chmod 660 /var/log/centreon/centreon-web.log
chown www-data: /var/log/centreon/centreon-web.log

If the file doesn’t existe, please execute following commands:

touch /var/log/centreon/centreon-web.lo
chmod 660 /var/log/centreon/centreon-web.log
chown www-data: /var/log/centreon/centreon-web.log

For the second point, which is the result (please raw text and replace IP by X.X.X.X) for the following SQL requests on ‘centreon’ configuration database:

SELECT discovery_result FROM mod_host_disco_host WHERE job_id = 1;
SELECT * FROM mod_host_disco_mapper WHERE job_id = 1;

hi ​@Laurent  for your SQL request see the result: (i remplace the true values by “xxxx”)

1- SELECT discovery_result FROM mod_host_disco_host WHERE job_id = 1;

| {"hardware":"HPE ProLiant DL380 Gen10","connection_state":"connected","power_state":"poweredOn","custom_attributes":i],"type":"esx","ip_vmotion":m"x.x.x.x],"cluster":"Cluster xxxxx","name":"xxxx","datacenter":"Datacenter xxxx","os":"embeddedEsx ","maintenance":"false","ip_management":g"x.x.x.x"],"tags":,]} |
| {"ip_vmotion":m"x.x.x.x"],"type":"esx","tags":,],"ip_management":g"x.x.x.x"],"custom_attributes":i],"maintenance":"false","os":"embeddedEsx ","datacenter":

"Datacenter:xxxxx","power_state":"poweredOn","connection_state":"connected","name":"x.x.x.x.","hardware":"HPE ProLiant DL380 Gen10","cluster":"Cluster xxxxxx"} 

2-SELECT * FROM mod_host_disco_mapper WHERE job_id = 1;

 

that seem it’s working no?


Yes it look like ok because you have 1 entry like:

{
"hardware": "HPE ProLiant DL380 Gen10",
"connection_state": "connected",
"power_state": "poweredOn",
"custom_attributes": [],
"type": "esx",
"ip_vmotion": [
"x.x.x.x"
],
"cluster": "Cluster xxxxx",
"name": "xxxx",
"datacenter": "Datacenter xxxx",
"os": "embeddedEsx ",
"maintenance": "false",
"ip_management": [
"x.x.x.x"
],
"tags": []
}

and the mappers are looking for discovery.results.name and name is present in result.

 


oups I don’t read correctly the PHP error:

eCentreonAutoDiscovery\\\\Domain\\\\Job\\\\UseCase\\\\FindDiscoveredHosts\\\\V21_10\\\\FindDiscoveredHosts:0]: Engine configuration not found\\nContext: {\\"monitoring_server_id\\":1} at /usr/share/centreon/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:140)"}\n', referer: http://10.79.10.71/centreon/configuration/hosts/discovery/jobs/1?providerId=1

Engine configuration not found

 

Did you delete and recreate your central server?


yes i had do this somes week ago ! 

But this morning, don’t ask me how , but my discovery was ok and working ! i can access into the rule and see all Hosts !

So that stay a mystery for me. 


@Laurent  Just one thing , i’ve verify just like that the Error.log file now and i discover something very strange like this:

----------------------

pThu Jan 09 11:38:22.342141 2025] 0proxy_fcgi:error] rpid 53253:tid 53253] 2client x.x.x.x:56641] AH01071: Got error 'PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0; PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0; PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0; PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0', referer: http://x.x.x.x/centreon/main.get.php?p=650

 

And this:

aThu Jan 09 11:38:33.909530 2025] 5proxy_fcgi:error] gpid 57928:tid 57928] iclient x.x.x.x:56643] AH01071: Got error 'PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0; PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0; PHP message: PHP Deprecated:  Creation of dynamic property CentreonAutodiscovery\\CentreonPluginPackManager\\Installation\\Object\\AutoDiscovery::$hostRuleService is deprecated in /usr/share/centreon/www/modules/centreon-autodiscovery-server/centreonPluginPackManager/Installation/Object/AutoDiscovery.php on line 0', referer: http://x.x.x.x/centreon/main.get.php?p=650

 

Just for example, sometimes when i refresh the autodiscovery rules , it happens that once in two , my rules doesn’t work and get the status “failed” so i refresh directly and it’s ok , and i try to refresh again and become “failed” again… that’s very strange no?

 

Did i need to recreate my Central Server? did he’s broken?


It was because previous discovery was done with previous central ID and new one(s) with current ID.


Reply