You are not logged in.
Hello,
I found a lot of errors according to Netzworkports in the php-errors.log.
Does anybody having an Idea how to get rid of them?
[2022-10-18 15:22:19] glpiphplog.WARNING: *** PHP User Warning (512): getFromDBByCrit expects to get one result, 179 found in query "SELECT `id` FROM `glpi_networkports_networkports` WHERE (`glpi_networkports_networkports`.`networkports_id_1` = '1025312' OR `glpi_networkports_networkports`.`networkports_id_2` = '1025312')". in /var/www/glpi/src/CommonDBTM.php at line 396
Backtrace :
src/CommonDBTM.php:396 trigger_error()
src/NetworkPort_NetworkPort.php:65 CommonDBTM->getFromDBByCrit()
src/NetworkPort_NetworkPort.php:269 NetworkPort_NetworkPort->getFromDBForNetworkPort()
src/CommonDBTM.php:1276 NetworkPort_NetworkPort->prepareInputForAdd()
src/Inventory/Asset/NetworkPort.php:797 CommonDBTM->add()
src/Inventory/Asset/NetworkPort.php:306 Glpi\Inventory\Asset\NetworkPort->addPortsWiring()
src/Inventory/Asset/NetworkPort.php:516 Glpi\Inventory\Asset\NetworkPort->handleMacConnection()
src/Inventory/Asset/NetworkPort.php:538 Glpi\Inventory\Asset\NetworkPort->handleConnections()
src/Inventory/Asset/NetworkPort.php:533 Glpi\Inventory\Asset\NetworkPort->portChanged()
src/Inventory/Asset/InventoryNetworkPort.php:610 Glpi\Inventory\Asset\NetworkPort->portCreated()
src/Inventory/Asset/InventoryNetworkPort.php:120 Glpi\Inventory\Asset\NetworkPort->handleCreates()
src/Inventory/Asset/NetworkPort.php:690 Glpi\Inventory\Asset\NetworkPort->handlePortsTrait()
src/Inventory/Asset/NetworkPort.php:523 Glpi\Inventory\Asset\NetworkPort->handlePorts()
src/Inventory/Asset/MainAsset.php:834 Glpi\Inventory\Asset\NetworkPort->handle()
src/Inventory/Asset/MainAsset.php:754 Glpi\Inventory\Asset\MainAsset->handleAssets()
src/Inventory/Asset/NetworkEquipment.php:221 Glpi\Inventory\Asset\MainAsset->rulepassed()
src/RuleImportAsset.php:965 Glpi\Inventory\Asset\NetworkEquipment->rulepassed()
src/Rule.php:1510 RuleImportAsset->executeActions()
src/RuleCollection.php:1591 Rule->process()
src/Inventory/Asset/MainAsset.php:554 RuleCollection->processAllRules()
src/Inventory/Inventory.php:701 Glpi\Inventory\Asset\MainAsset->handle()
src/Inventory/Inventory.php:336 Glpi\Inventory\Inventory->handleItem()
...inc/communicationnetworkinventory.class.php:156 Glpi\Inventory\Inventory->doInventory()
marketplace/glpiinventory/hook.php:1096 PluginGlpiinventoryCommunicationNetworkInventory->import()
src/Plugin.php:1523 plugin_glpiinventory_network_inventory()
src/Inventory/Request.php:278 Plugin::doHookFunction()
src/Inventory/Request.php:250 Glpi\Inventory\Request->network()
src/Inventory/Request.php:98 Glpi\Inventory\Request->networkInventory()
src/Agent/Communication/AbstractRequest.php:305 Glpi\Inventory\Request->handleAction()
src/Agent/Communication/AbstractRequest.php:242 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest()
front/inventory.php:86 Glpi\Agent\Communication\AbstractRequest->handleRequest()
[2022-10-18 15:22:19] glpiphplog.WARNING: *** PHP User Warning (512): Wired non unique! in /var/www/glpi/src/NetworkPort_NetworkPort.php at line 271
Backtrace :
src/NetworkPort_NetworkPort.php:271 trigger_error()
src/CommonDBTM.php:1276 NetworkPort_NetworkPort->prepareInputForAdd()
src/Inventory/Asset/NetworkPort.php:797 CommonDBTM->add()
src/Inventory/Asset/NetworkPort.php:306 Glpi\Inventory\Asset\NetworkPort->addPortsWiring()
src/Inventory/Asset/NetworkPort.php:516 Glpi\Inventory\Asset\NetworkPort->handleMacConnection()
src/Inventory/Asset/NetworkPort.php:538 Glpi\Inventory\Asset\NetworkPort->handleConnections()
src/Inventory/Asset/NetworkPort.php:533 Glpi\Inventory\Asset\NetworkPort->portChanged()
src/Inventory/Asset/InventoryNetworkPort.php:610 Glpi\Inventory\Asset\NetworkPort->portCreated()
src/Inventory/Asset/InventoryNetworkPort.php:120 Glpi\Inventory\Asset\NetworkPort->handleCreates()
src/Inventory/Asset/NetworkPort.php:690 Glpi\Inventory\Asset\NetworkPort->handlePortsTrait()
src/Inventory/Asset/NetworkPort.php:523 Glpi\Inventory\Asset\NetworkPort->handlePorts()
src/Inventory/Asset/MainAsset.php:834 Glpi\Inventory\Asset\NetworkPort->handle()
src/Inventory/Asset/MainAsset.php:754 Glpi\Inventory\Asset\MainAsset->handleAssets()
src/Inventory/Asset/NetworkEquipment.php:221 Glpi\Inventory\Asset\MainAsset->rulepassed()
src/RuleImportAsset.php:965 Glpi\Inventory\Asset\NetworkEquipment->rulepassed()
src/Rule.php:1510 RuleImportAsset->executeActions()
src/RuleCollection.php:1591 Rule->process()
src/Inventory/Asset/MainAsset.php:554 RuleCollection->processAllRules()
src/Inventory/Inventory.php:701 Glpi\Inventory\Asset\MainAsset->handle()
src/Inventory/Inventory.php:336 Glpi\Inventory\Inventory->handleItem()
...inc/communicationnetworkinventory.class.php:156 Glpi\Inventory\Inventory->doInventory()
marketplace/glpiinventory/hook.php:1096 PluginGlpiinventoryCommunicationNetworkInventory->import()
src/Plugin.php:1523 plugin_glpiinventory_network_inventory()
src/Inventory/Request.php:278 Plugin::doHookFunction()
src/Inventory/Request.php:250 Glpi\Inventory\Request->network()
src/Inventory/Request.php:98 Glpi\Inventory\Request->networkInventory()
src/Agent/Communication/AbstractRequest.php:305 Glpi\Inventory\Request->handleAction()
src/Agent/Communication/AbstractRequest.php:242 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest()
front/inventory.php:86 Glpi\Agent\Communication\AbstractRequest->handleRequest()
Additional I found some errors in sql-errors.log which could be part of the probkem::
[2022-10-18 15:06:32] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/src/DBmysql.php line 370
*** MySQL query error:
SQL: DELETE `glpi_networkports_networkports` FROM `glpi_networkports_networkports` WHERE `id` = '353342'
Error: Lock wait timeout exceeded; try restarting transaction
Backtrace :
src/DBmysql.php:1542
src/CommonDBTM.php:788 DBmysql->delete()
src/CommonDBTM.php:2032 CommonDBTM->deleteFromDB()
src/Inventory/Asset/NetworkPort.php:792 CommonDBTM->delete()
src/Inventory/Asset/NetworkPort.php:306 Glpi\Inventory\Asset\NetworkPort->addPortsWiring()
src/Inventory/Asset/NetworkPort.php:516 Glpi\Inventory\Asset\NetworkPort->handleMacConnection()
src/Inventory/Asset/NetworkPort.php:538 Glpi\Inventory\Asset\NetworkPort->handleConnections()
src/Inventory/Asset/NetworkPort.php:533 Glpi\Inventory\Asset\NetworkPort->portChanged()
src/Inventory/Asset/InventoryNetworkPort.php:610 Glpi\Inventory\Asset\NetworkPort->portCreated()
src/Inventory/Asset/InventoryNetworkPort.php:120 Glpi\Inventory\Asset\NetworkPort->handleCreates()
src/Inventory/Asset/NetworkPort.php:690 Glpi\Inventory\Asset\NetworkPort->handlePortsTrait()
src/Inventory/Asset/NetworkPort.php:523 Glpi\Inventory\Asset\NetworkPort->handlePorts()
src/Inventory/Asset/MainAsset.php:834 Glpi\Inventory\Asset\NetworkPort->handle()
src/Inventory/Asset/MainAsset.php:754 Glpi\Inventory\Asset\MainAsset->handleAssets()
src/Inventory/Asset/NetworkEquipment.php:221 Glpi\Inventory\Asset\MainAsset->rulepassed()
src/RuleImportAsset.php:965 Glpi\Inventory\Asset\NetworkEquipment->rulepassed()
src/Rule.php:1510 RuleImportAsset->executeActions()
src/RuleCollection.php:1591 Rule->process()
src/Inventory/Asset/MainAsset.php:554 RuleCollection->processAllRules()
src/Inventory/Inventory.php:701 Glpi\Inventory\Asset\MainAsset->handle()
src/Inventory/Inventory.php:336 Glpi\Inventory\Inventory->handleItem()
...inc/communicationnetworkinventory.class.php:156 Glpi\Inventory\Inventory->doInventory()
marketplace/glpiinventory/hook.php:1096 PluginGlpiinventoryCommunicationNetworkInventory->import()
src/Plugin.php:1523 plugin_glpiinventory_network_inventory()
src/Inventory/Request.php:278 Plugin::doHookFunction()
src/Inventory/Request.php:250 Glpi\Inventory\Request->network()
src/Inventory/Request.php:98 Glpi\Inventory\Request->networkInventory()
src/Agent/Communication/AbstractRequest.php:305 Glpi\Inventory\Request->handleAction()
src/Agent/Communication/AbstractRequest.php:242 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest()
front/inventory.php:86 Glpi\Agent\Communication\AbstractRequest->handleRequest()
{"user":"inventory@glpi","mem_usage":"50.462\", 7.23Mio)"}
[2022-10-18 15:06:42] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/src/DBmysql.php line 370
*** MySQL query error:
SQL: DELETE `glpi_networkports_networkports` FROM `glpi_networkports_networkports` WHERE `id` = '353342'
Error: Lock wait timeout exceeded; try restarting transaction
Backtrace :
src/DBmysql.php:1542
src/CommonDBTM.php:788 DBmysql->delete()
src/CommonDBTM.php:2032 CommonDBTM->deleteFromDB()
src/Inventory/Asset/NetworkPort.php:792 CommonDBTM->delete()
src/Inventory/Asset/NetworkPort.php:306 Glpi\Inventory\Asset\NetworkPort->addPortsWiring()
src/Inventory/Asset/NetworkPort.php:516 Glpi\Inventory\Asset\NetworkPort->handleMacConnection()
src/Inventory/Asset/NetworkPort.php:538 Glpi\Inventory\Asset\NetworkPort->handleConnections()
src/Inventory/Asset/NetworkPort.php:533 Glpi\Inventory\Asset\NetworkPort->portChanged()
[2022-10-18 15:06:32] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/src/DBmysql.php line 370
*** MySQL query error:
SQL: DELETE `glpi_networkports_networkports` FROM `glpi_networkports_networkports` WHERE `id` = '353342'
Error: Lock wait timeout exceeded; try restarting transaction
Backtrace :
src/DBmysql.php:1542
Last edited by doesntMatter (2022-10-18 15:32:37)
Offline
Hi doesntMatter
fyi, it's impossible to analyze such warnings if you don't share which version of GLPI you're using. If this is not the latest, you can check for fixed issues on the github project. Maybe the problem is still fixed.
GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer
Offline
Hi doesntMatter
fyi, it's impossible to analyze such warnings if you don't share which version of GLPI you're using. If this is not the latest, you can check for fixed issues on the github project. Maybe the problem is still fixed.
Hi,
it's the latest Version 10.0.3...
Last edited by doesntMatter (2022-10-18 15:52:15)
Offline
I found out that in the after my vacation i have over 30.000 of multiple networkdevices in the gui... I'm currently deleting them via gui - maybe after this the problems will be gone...
Offline
After deleting all existing network devivces there are no more php errors. But I got some new sql error after enabling snmp again?!
[2022-10-19 11:49:08] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/src/DBmysql.php line 370
*** MySQL query error:
SQL: INSERT INTO `glpi_items_devicefirmwares` (`devicefirmwares_id`, `itemtype`, `items_id`, `is_dynamic`, `locations_id`, `entities_id`, `is_recursive`) VALUES ('165', 'NetworkEquipment', '32368', '1', '184', '0', '0')
Error: Deadlock found when trying to get lock; try restarting transaction
Backtrace :
src/DBmysql.php:1312
src/CommonDBTM.php:716 DBmysql->insert()
src/CommonDBTM.php:1321 CommonDBTM->addToDB()
src/Inventory/Asset/Device.php:142 CommonDBTM->add()
src/Inventory/Asset/MainAsset.php:834 Glpi\Inventory\Asset\Device->handle()
src/Inventory/Asset/MainAsset.php:754 Glpi\Inventory\Asset\MainAsset->handleAssets()
src/Inventory/Asset/NetworkEquipment.php:221 Glpi\Inventory\Asset\MainAsset->rulepassed()
src/RuleImportAsset.php:965 Glpi\Inventory\Asset\NetworkEquipment->rulepassed()
src/Rule.php:1510 RuleImportAsset->executeActions()
src/RuleCollection.php:1591 Rule->process()
src/Inventory/Asset/MainAsset.php:554 RuleCollection->processAllRules()
src/Inventory/Inventory.php:701 Glpi\Inventory\Asset\MainAsset->handle()
src/Inventory/Inventory.php:336 Glpi\Inventory\Inventory->handleItem()
...inc/communicationnetworkdiscovery.class.php:130 Glpi\Inventory\Inventory->doInventory()
marketplace/glpiinventory/hook.php:1078 PluginGlpiinventoryCommunicationNetworkDiscovery->import()
src/Plugin.php:1523 plugin_glpiinventory_network_discovery()
src/Inventory/Request.php:278 Plugin::doHookFunction()
src/Inventory/Request.php:236 Glpi\Inventory\Request->network()
src/Inventory/Request.php:93 Glpi\Inventory\Request->networkDiscovery()
src/Agent/Communication/AbstractRequest.php:305 Glpi\Inventory\Request->handleAction()
src/Agent/Communication/AbstractRequest.php:242 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest()
front/inventory.php:86 Glpi\Agent\Communication\AbstractRequest->handleRequest()
Last edited by doesntMatter (2022-10-19 11:56:10)
Offline