ocsinventoryng icon indicating copy to clipboard operation
ocsinventoryng copied to clipboard

Log noyé sous les erreurs ( 1 giga en 1 journée )

Open jlb5980 opened this issue 1 year ago • 8 comments

Bonjour

A chaque import des machines d'ocs à glpi je recupére dans le log php-error de glpi

2023-06-23 11:53:34] glpiphplog.WARNING: *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /data/glpiv/src/DbUtils.php at line 2099 Backtrace : src/DbUtils.php:2099 trigger_error() inc/db.function.php:585 DbUtils->getDbRelations() src/CommonDBTM.php:866 getDbRelations() src/CommonDBTM.php:788 CommonDBTM->cleanRelationData() src/CommonDBTM.php:2064 CommonDBTM->deleteFromDB() src/MassiveAction.php:1495 CommonDBTM->delete() src/MassiveAction.php:1408 MassiveAction::processMassiveActionsForOneItemtype() src/MassiveAction.php:1386 MassiveAction->processForSeveralItemtypes() front/massiveaction.php:59 MassiveAction->process()

Cc message je le rencontre également dans le ocsng_fullsync.log qui est d'ailleurs noyer sous les messages d'erreurs de ce type !

Et encore bravo pour le maintien du plugin . Cordialement

  • The version of the plugin. : ocsinventoryng 2.0.4
  • The version of your GLPI : 10.0.7
  • The steps to reproduce your issue.

jlb5980 avatar Jun 23 '23 12:06 jlb5980

Bonjour, même problème de mon coté...

The version of the plugin. : ocsinventoryng 2.0.4 The version of your GLPI : 10.0.9 The steps to reproduce your issue :

  • Launch script manually :
  1. /usr/bin/php /var/www/html/glpi/marketplace/ocsinventoryng/scripts/run.php --thread_nbr=2 --server_id=1
  2. sh /var/www/html/glpi/marketplace/ocsinventoryng/scripts/ocsng_fullsync.sh --thread_nbr=2 --server_id=1

eilkh avatar Aug 01 '23 12:08 eilkh

hurray, @tsmr is back! thanks a lot for this fix, it works :)

ajavor avatar Aug 08 '23 07:08 ajavor

Thank you !!

eilkh avatar Aug 08 '23 08:08 eilkh

Merci

jlb5980 avatar Sep 14 '23 12:09 jlb5980

Hi We have noticed the same issue in our setup, with GLPI updated to latest version 10.0.10. The fixed hook.php doesn't seem to work for this version.

Thank you for any help or idea!

Kind Regards

hiscorebob avatar Oct 25 '23 12:10 hiscorebob

@hiscorebob Can you give more details what is not working?

blippercop avatar Jan 15 '24 14:01 blippercop

@hiscorebob Can you give more details what is not working?

Automated sync with shell scripts are not working. I see a lot of following errors in glpi/files/_log/php-errors.log:

CRITICAL: *** Uncaught Exception Error: Call to a member function add() on null in /var/www/html/glpi/marketplace/ocsinventoryng/inc/networkport.class.php at line 270

WARNING: *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/html/glpi/src/DbUtils.php at line 2131 Backtrace : src/DbUtils.php:2131 trigger_error() inc/db.function.php:585 DbUtils->getDbRelations() src/CommonDBTM.php:866 getDbRelations() src/CommonDBTM.php:788 CommonDBTM->cleanRelationData() src/CommonDBTM.php:2068 CommonDBTM->deleteFromDB() src/CommonDBTM.php:4631 CommonDBTM->delete() marketplace/ocsinventoryng/inc/os.class.php:254 CommonDBTM->deleteByCriteria()

hiscorebob avatar Jan 16 '24 12:01 hiscorebob

@hiscorebob Latest commit 8433a48 fix the issue, download it from here : https://github.com/pluginsGLPI/ocsinventoryng/archive/8433a4822d7693619981adfcd0c5a934633a55ec.zip

roms2000 avatar Apr 14 '24 10:04 roms2000