glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

[solved} Unable to deploy and inventory ! from 10.0.10 gliinventory 1.3.4 #454

Closed falco2001 closed 9 months ago

falco2001 commented 9 months ago

Describe the bug

Erreur :


[2023-12-14 10:01:52] glpiphplog.WARNING:   *** PHP Warning (2): foreach() argument must be of type array|object, null given in /var/www/assistance/plugins/glpiinventory/inc/deploygroup_dynamicdata.class.php at line 283
  Backtrace :
  ...ins/glpiinventory/inc/deploygroup.class.php:643 PluginGlpiinventoryDeployGroup_Dynamicdata::getTargetsByGroup()
  plugins/glpiinventory/inc/toolbox.class.php:407    PluginGlpiinventoryDeployGroup::getTargetsForGroup()
  plugins/glpiinventory/inc/taskview.class.php:1013  PluginGlpiinventoryToolbox->executeAsGlpiinventoryUser()
  plugins/glpiinventory/inc/taskview.class.php:832   PluginGlpiinventoryTaskView->getAgentsFromActors()
  plugins/glpiinventory/inc/task.class.php:623       PluginGlpiinventoryTaskView->prepareTaskjobs()
  src/CronTask.php:1018                              PluginGlpiinventoryTask::cronTaskscheduler()
  front/cron.php:84     

140.77.x.1x - - [14/Dec/2023:10:01:07 +0100] "GET /plugins/glpiinventory/b/deploy/?action=getJobs&version=3.0&machineid=l105301.DSI..FR-2023-08-31-12-54-56 HTTP/1.1" 302 623 "-" "GLPI-Agent_v1.5"

thanks

To reproduce

nothing

Expected behavior

nothing

Operating system

Linux

GLPI Agent version

1.5

GLPI version

10.0.10

GLPIInventory plugin

No response

Additional context

No response

stonebuzz commented 9 months ago

Hi @falco2001 can you delete / create again your dynamic group ?

falco2001 commented 9 months ago

ok I will try but there is no code to modify? To make a migration it takes me several days! because we have many custom plugins and many uses of the API (which also fails see other closed ticket) Thanks for your help as we are stuck and I can’t go back

falco2001 commented 9 months ago

delete groupe and create idem ! Do we have to change anything here?

$results = Search::prepareDatasForSearch('Computer', $search_params, ['2']);
            Search::constructSQL($results);
            Search::constructData($results);

            foreach ($results['data']['rows'] as $id => $row) {
                 $ids[$row['id']] = $row['id'];
            }
falco2001 commented 9 months ago

re, I just deleted the software from a position. In fact, there is no deployment or inventory of the software. How to. Is that the tool we use to do inventories and deployments? I can’t go back. It takes me between 1 week and 3 weeks to test a new version ... API, plugin, css ..... Thank you.

I just did a test of a task without going through the groups with software deployed on my pc : nothing happens. But by forcing. and doing on the customer position glpi-agent -f

falco2001 commented 9 months ago

and :

[[2023-12-14 14:31:02] glpiphplog.WARNING:   *** PHP User Warning (512): Invalid item "PluginGlpiinventoryDeployGroup" (291). in /var/www/assistance/plugins/glpiinventory/inc/taskview.class.php at line 1000
  Backtrace :
  plugins/glpiinventory/inc/taskview.class.php:1000  trigger_error()
  plugins/glpiinventory/inc/taskview.class.php:832   PluginGlpiinventoryTaskView->getAgentsFromActors()
  plugins/glpiinventory/inc/task.class.php:623       PluginGlpiinventoryTaskView->prepareTaskjobs()
  src/CronTask.php:1018                              PluginGlpiinventoryTask::cronTaskscheduler()
  front/cron.php:84    ](url)
falco2001 commented 9 months ago

Is this apache 302 error blocking? [14/Dec/2023:14:35:34 +0100] "GET /plugins/glpiinventory/b/deploy/?action=getJobs&machineid=l102826.DSI.EN.FR-2023-09-14-12-01-31&version=3.0 HTTP/1.1" 302 623 "-" "GLPI-Agent_v1.5"

stonebuzz commented 9 months ago

Can you post here criteria used by dynamic group ?

falco2001 commented 9 months ago

Hello, this is not a group problem at first since the deployment of a task with software no longer works. No problem in the version before 10.0.6

falco2001 commented 9 months ago

I don’t know how since I’m in prod to return to version 10.0.6? I had tested the glpiagent agents but I had not checked if the software was well added! How to do . No inventory, no deployment?

falco2001 commented 9 months ago

For the 302 problem I think I found ... but no deployment I have this: [Thu Dec 14 15:58:50 2023][info] target server0: server https://assistance.fr/plugins/glpiinventory [Thu Dec 14 15:58:50 2023][info] sending contact request to server0 [Thu Dec 14 15:58:50 2023][debug] [http client] Updating keystore known certificates [Thu Dec 14 15:58:52 2023][debug] server message: remoteinventory task not supported [Thu Dec 14 15:58:52 2023][info] sending prolog request to server0 [Thu Dec 14 15:58:52 2023][error] [http client] can't uncompress content starting with: Unknown column 'glpi_budgets_93d644b41c3544155af36e354b01ba13.id' in 'where clause'Unknown column 'glpi_budgets_93d644b41c3544155af36e354b01ba13.id' in 'where clause'x£│▒»╚═Q(K-*╬╠┤3┤ÐGµ☻ò♦°¹♣╗┌♣╗·╣ÏÞ├╣ &H3 Á →♦ [Thu Dec 14 15:58:52 2023][error] No supported answer from server at https://assistance.fr/plugins/glpiinventory

falco2001 commented 9 months ago

image image

stonebuzz commented 9 months ago
[Thu Dec 14 15:58:52 2023][error] [http client] can't uncompress content starting with: Unknown column 'glpi_budgets_93d644b41c3544155af36e354b01ba13.id' in 'where clause'Unknown column 'glpi_budgets_93d644b41c3544155af36e354b01ba13.id' in 'where clause'x£│▒»╚═Q(K-*╬╠┤3┤ÐGµ☻ò♦°¹♣╗┌♣╗·╣ÏÞ├╣ &H3

Please post here criteria used by dynamic group.

falco2001 commented 9 months ago

Actually the problem was code 303 returned by apache. Only I modify glpi, glpi code, plugins, apache and sgbd. Something happened during the migration: In fact the agent address in the glpi settings changed: Moved from https://assistance.site.fr to http://assistance.site.fr I didn’t change anything! if you can look. I spent two days there to understand the problem Since on apache there is no validation without fusion for port 80 the client addresses were in error There are always mistakes hard groups but this does not hinder the deployment. In summary: everything works again. Thank you for your responsiveness