pluginsGLPI / ocsinventoryng

Plugin ocsinventoryng for GLPI
GNU General Public License v2.0
68 stars 52 forks source link

duplicate entry notimportedcomputers #373

Open ready2play32 opened 7 months ago

ready2play32 commented 7 months ago

Hello, i use glpi version 10.0.6 and ocsinventory plugin version 2.0.4 i have a issue when i launch the import script /var/www/glpi/plugins/ocsinventoryng/scripts/ocsng_fullsync.sh

The computers are not imported or updated and i have sql errors below : SQL: INSERT INTO glpi_plugin_ocsinventoryng_notimportedcomputers (name, domain, tag, ocs_deviceid, ipaddr, plugin_ocsinventoryng_ocsservers_id, ocsid, last_inventory, useragent, serial, reason, comment, entities_id, rules_id) VALUES ('totopc1', 'toto', 'MAB1613', 'totopc1-2024-01-28-16-31-02', '::1', '2', '2544509', '2024-01-29 07:00:44', 'OCS-NG_INJECTOR_PL_v3', '', '3', '', '0', '[]') Error: Duplicate entry '2-2544509' for key 'ocs_id' Backtrace : src/DBmysql.php:1320 src/CommonDBTM.php:721 DBmysql->insert() src/CommonDBTM.php:1326 CommonDBTM->addToDB() ...ventoryng/inc/notimportedcomputer.class.php:392 CommonDBTM->add() ...s/ocsinventoryng/scripts/ocsng_fullsync.php:468 PluginOcsinventoryngNotimportedcomputer->logNotImported() ...s/ocsinventoryng/scripts/ocsng_fullsync.php:299 plugin_ocsinventoryng_importFromOcsServer() ...s/ocsinventoryng/scripts/ocsng_fullsync.php:179 SecondPass()