Closed brunnersm closed 2 years ago
You probably have an agent (or more...) listed in your database with a missing itemtype; could you please check that? No idea how this has happened; maybe some other data on wrong line can help to understand.
SELECT FROM glpi_agents WHERE itemtype <> 'Computer' / Registros afetados: 0 Registros encontrados: 0 Avisos: 0 Duração de 1 consulta: 0,000 seg. */
This can be a still referenced agent in glpi_plugin_glpiinventory_taskjobstates
that has been deleted in agents table.
This looks like a plugin issue, try with:
diff --git a/inc/agentwakeup.class.php b/inc/agentwakeup.class.php
index b0a961a2ae..35df4c5883 100644
--- a/inc/agentwakeup.class.php
+++ b/inc/agentwakeup.class.php
@@ -172,11 +172,12 @@ class PluginGlpiinventoryAgentWakeup extends CommonDBTM
if (isset($wakeupArray[$agents_id])) {
$counter++;
} else {
- $agent->getFromDB($agents_id);
- $statusAgent = $agent->requestStatus();
- if ($statusAgent['answer'] == 'waiting') {
- $wakeupArray[$agents_id] = $agents_id;
- $counter++;
+ if ($agent->getFromDB($agents_id)) {
+ $statusAgent = $agent->requestStatus();
+ if ($statusAgent['answer'] == 'waiting') {
+ $wakeupArray[$agents_id] = $agents_id;
+ $counter++;
+ }
}
}
Thanks, i run "DELETE FROM glpi_plugin_glpiinventory_taskjobstates WHERE agents_id = 0" and fix the problem. Maybe because it was FusionInventory before
Possible, yes... I close the issue for now; we'll investigate if it appears again then.
Code of Conduct
Is there an existing issue for this?
Version
10.0.1
Bug description
Return error in php-errros.log with php front/cron.php about src/Agent.php
Relevant log output
Page URL
No response
Steps To reproduce
php /var/www/html/front/cron.php &>/dev/null
Your GLPI setup information
Instruções de instalação e configuração
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
No response