Giter Site home page Giter Site logo

[glpi inventory 1.0.0-rc5] Task jobs migration to glpiinventory and impossible to view job configuration about glpi-inventory-plugin HOT 25 CLOSED

glpi-project avatar glpi-project commented on September 12, 2024
[glpi inventory 1.0.0-rc5] Task jobs migration to glpiinventory and impossible to view job configuration

from glpi-inventory-plugin.

Comments (25)

trasher avatar trasher commented on September 12, 2024

Problem is there are some PluginFusioninventoryIPRange stored in your database, you should replace them with PluginGlpiinventoryIPRange with an SQL query as a workaround.

Some types that can be stored in the database has not been handled; but original plugin does not provide any kind of list of types that can be stored. I'll have to check manually each removed one and handle it since it may eventually be used in a itemtype column.

from glpi-inventory-plugin.

trasher avatar trasher commented on September 12, 2024

Please try #69

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

The migration of the plugin (RC6) is not done because there are this error
log_migration_plug.zip

from glpi-inventory-plugin.

trasher avatar trasher commented on September 12, 2024

You have to:
1- drop all tables in glpi database,
2- restore original backup
3- proceed migration

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

Yes

  1. Drop database glpi10beta (RC2)
  2. Restore 9.5.7
  3. Migration 9.5.7 ===> 10.0 RC2 (Version 12/03/2022)
  4. Install plugin glpiinventory + FIX

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024
  1. After migration 9.5.7==> 10.0 RC2 I delete fusion inventory
    I click to clean Fusion inventory
    image

  2. Click to install
    image

  3. after install
    migration_to_1.0.0-rc6.log+migration_to_9.5+3.0.log+sql-errors.log
    migration_to_1.0.0-rc6.zip

  4. Activation plugin
    bug display but after I refresh with the F5 key and i must to I have to activate a second time
    image

  5. Activation OK
    image

I still have the same issues

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

@steph461

Please give the content of php-errors-log related to plugin installation.

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

[2022-03-14 15:20:01] glpiphplog.CRITICAL: *** Uncaught Exception Error: Call to a member function getFromDB() on bool in /var/www/html/glpi10beta/marketplace/glpiinventory/inc/task.class.php at line 742
Backtrace :
marketplace/glpiinventory/inc/task.class.php:587 PluginGlpiinventoryTask->getAgentsFromActors()
marketplace/glpiinventory/inc/task.class.php:824 PluginGlpiinventoryTask->prepareTaskjobs()
src/CronTask.php:1016 PluginGlpiinventoryTask::cronTaskscheduler()
front/cron.php:82 CronTask::launch()

I apply fix #69 (file update.native.php )

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

Can you apply following patch and give us the new trace of the error ?

diff --git a/inc/task.class.php b/inc/task.class.php
index 92abb96e3..ccc147277 100644
--- a/inc/task.class.php
+++ b/inc/task.class.php
@@ -739,10 +739,22 @@ class PluginGlpiinventoryTask extends PluginGlpiinventoryTaskView
             $itemtype = key($actor);
             $itemid   = $actor[$itemtype];
             $item     = getItemForItemtype($itemtype);
+
+            // If this item doesn't exists, we continue to the next actor item.
+            // TODO: remove this faulty actor from the list of job actor.
+            if ($item === false) {
+                trigger_error(
+                    sprintf('Invalid itemtype "%s".', $itemtype),
+                    E_USER_WARNING
+                );
+                continue;
+            }
             $dbresult = $item->getFromDB($itemid);
-           // If this item doesn't exists, we continue to the next actor item.
-           // TODO: remove this faulty actor from the list of job actor.
             if ($dbresult === false) {
+                trigger_error(
+                    sprintf('Invalid item "%s" (%s).', $itemtype, $itemid),
+                    E_USER_WARNING
+                );
                 continue;
             }

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

For information, This migration must replace PluginFusioninventoryUnmanaged with Unmanaged #glpi-project/glpi#10817

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

@cedric-anne

Is it possible to have the patch file please ?
I don't really know PHP , sorry :)

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

You just have to save the code snippet I give in a .patch file.

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

@cedric-anne

the log has changed

[2022-03-15 09:30:02] glpiphplog.WARNING:   *** PHP User Warning (512): Invalid itemtype "PluginFusioninventoryAgent". in /var/www/html/glpi10beta/marketplace/glpiinventory/inc/task.class.php at line 748
  Backtrace :
  marketplace/glpiinventory/inc/task.class.php:748   trigger_error()
  marketplace/glpiinventory/inc/task.class.php:587   PluginGlpiinventoryTask->getAgentsFromActors()
  marketplace/glpiinventory/inc/task.class.php:836   PluginGlpiinventoryTask->prepareTaskjobs()
  src/CronTask.php:1016                              PluginGlpiinventoryTask::cronTaskscheduler()
  front/cron.php:82                                  CronTask::launch()
  
[2022-03-15 09:31:01] glpiphplog.WARNING:   *** PHP User Warning (512): Invalid itemtype "PluginFusioninventoryAgent". in /var/www/html/glpi10beta/marketplace/glpiinventory/inc/task.class.php at line 748
  Backtrace :
  marketplace/glpiinventory/inc/task.class.php:748   trigger_error()
  marketplace/glpiinventory/inc/task.class.php:587   PluginGlpiinventoryTask->getAgentsFromActors()
  marketplace/glpiinventory/inc/task.class.php:836   PluginGlpiinventoryTask->prepareTaskjobs()
  src/CronTask.php:1016                              PluginGlpiinventoryTask::cronTaskscheduler()
  front/cron.php:82                                  CronTask::launch()
 
``

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

For information

old , view KO
image

Update, view ok i change the name target and actor it was ok. No error log
image
image

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

In which tables did you changed entries ?

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

In which tables did you changed entries ?

glpi_plugin_glpiinventory_taskjobs

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

#71 should fix the migration.

I have no plugin data to validate it. Is it possible for you to test the whole migration process again ?

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

@cedric-anne

glpi10beta/marketplace/glpiinventory/front/menu.php ( blank page)

[2022-03-15 12:50:36] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key 0 in /var/www/html/glpi10beta/marketplace/glpiinventory/install/update.native.php at line 186
  Backtrace :
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  
[2022-03-15 12:50:36] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key 0 in /var/www/html/glpi10beta/marketplace/glpiinventory/install/update.native.php at line 186
  Backtrace :
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  
[2022-03-15 12:51:39] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Class "PluginGlpiinventoryMenu" not found in /var/www/html/glpi10beta/marketplace/glpiinventory/front/menu.php at line 36  
[2022-03-15 12:51:43] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Class "PluginGlpiinventoryMenu" not found in /var/www/html/glpi10beta/marketplace/glpiinventory/front/menu.php at line 36  
[2022-03-15 12:51:46] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Class "PluginGlpiinventoryMenu" not found in /var/www/html/glpi10beta/marketplace/glpiinventory/front/menu.php at line 36  
[2022-03-15 12:53:30] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Class "PluginGlpiinventoryMenu" not found in /var/www/html/glpi10beta/marketplace/glpiinventory/front/menu.php at line 36  

image

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

My bad, I added a commit (2c17ede)

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

it's ok the migration except the esx task and it will be all good :)
image

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

I pushed another commit to handle removal of stale data. Seems that your ESX task is linked to an agent that does not exists anymore.

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

Wait, I made a mistake.

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

Wait, I made a mistake.

Now it should be OK. Could you test again ?

from glpi-inventory-plugin.

steph461 avatar steph461 commented on September 12, 2024

Wait, I made a mistake.

Now it should be OK. Could you test again ?

it's good, everything is fixed :)

With each migration of the plugin, I have an error message sql.error.og. I create a new issue ?
I got this error all the time since plugin rcx

[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('NetworkEquipment', '22', 'otherserial', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'NetworkEquipment-22-otherserial' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Printer', '57', 'locations_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Printer-57-locations_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.069\", 6.06Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Printer', '77', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Printer-77-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.030\", 6.07Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '214', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-214-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.090\", 6.07Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Printer', '21', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Printer-21-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.073\", 6.07Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '235', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-235-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.169\", 6.08Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '236', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-236-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.004\", 6.08Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '257', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-257-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.167\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '258', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-258-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.002\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '261', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-261-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.013\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '259', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-259-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.002\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '262', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-262-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.002\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '263', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-263-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.003\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '264', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-264-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.004\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '265', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-265-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.003\", 6.09Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '268', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-268-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.116\", 6.10Mio)"} 
[2022-03-15 13:28:01] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '269', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-269-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.003\", 6.10Mio)"} 
[2022-03-15 13:28:02] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '296', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-296-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.181\", 6.10Mio)"} 
[2022-03-15 13:28:02] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '297', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-297-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.002\", 6.10Mio)"} 
[2022-03-15 13:28:02] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Computer', '298', 'states_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Computer-298-states_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.003\", 6.10Mio)"} 
[2022-03-15 13:28:03] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Printer', '264', 'locations_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Printer-264-locations_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.868\", 6.15Mio)"} 
[2022-03-15 13:28:03] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Printer', '266', 'locations_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Printer-266-locations_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.005\", 6.15Mio)"} 
[2022-03-15 13:28:03] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi10beta/src/DBmysql.php line 367
  *** MySQL query error:
  SQL: INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `date_creation`, `date_mod`) VALUES ('Printer', '270', 'locations_id', '2022-03-15 13:27:55', '2022-03-15 13:27:55')
  Error: Duplicate entry 'Printer-270-locations_id' for key 'unicity'
  Backtrace :
  src/DBmysql.php:1295                               
  src/CommonDBTM.php:657                             DBmysql->insert()
  src/CommonDBTM.php:1249                            CommonDBTM->addToDB()
  ...ace/glpiinventory/install/update.native.php:552 CommonDBTM->add()
  marketplace/glpiinventory/hook.php:327             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:773                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:486                 call_user_func()
  src/Marketplace/Controller.php:405                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:80                            Glpi\Marketplace\Controller->installPlugin()
  {"user":"7@srv-glpi","mem_usage":"0.019\", 6.15Mio)"} 

from glpi-inventory-plugin.

cedric-anne avatar cedric-anne commented on September 12, 2024

With each migration of the plugin, I have an error message sql.error.og. I create a new issue ?

Yes, please create a new issue.

from glpi-inventory-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.