You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-04-17 14:40:49

Lschmid2056
Member
Registered: 2023-04-17
Posts: 4

Ip address reporting problem with GLPI inventory

Hello,

I currently have an IP address reporting problem with the GLPI inventory plugin.

Here are the lines from the log file.

[2023-04-17 15:24:08] glpisqllog.ERROR: DBmysql::query() in C:\inetpub\wwwroot\glpi\src\DBmysql.php line 370
  *** MySQL query error:
  SQL: INSERT INTO `glpi_ipnetworks` (`name`, `gateway`, `entities_id`, `version`, `address`, `address_0`, `address_1`, `address_2`, `address_3`, `netmask`, `netmask_0`, `netmask_1`, `netmask_2`, `netmask_3`, `gateway_0`, `gateway_1`, `gateway_2`, `gateway_3`, `ipnetworks_id`, `level`, `completename`, `date_creation`, `date_mod`) VALUES ('XXX.XX.XX.X/255.255.255.0 - XXX.XX.XX.XX', 'XXX.XX.XX.XX', '1', '4', 'XXX.XX.XX.X', '0', '0', '65535', '-1407560960', '255.255.255.0', '4294967295', '4294967295', '4294967295', '-256', '0', '0', '65535', '-1407560950', '0', '1', 'XXX.XXX.XXX.0/255.255.255.0 - XXX.XX.XX.XX', '2023-04-17 14:24:07', '2023-04-17 14:24:07')
  Error: Out of range value for column 'address_3' at row 1
  Backtrace :
  src\DBmysql.php:1320                               
  src\CommonDBTM.php:722                             DBmysql->insert()
  src\CommonDBTM.php:1317                            CommonDBTM->addToDB()
  src\Inventory\Asset\InventoryNetworkPort.php:243   CommonDBTM->add()
  src\Inventory\Asset\InventoryNetworkPort.php:120   Glpi\Inventory\Asset\MainAsset->handleIpNetworks()
  src\Inventory\Asset\MainAsset.php:816              Glpi\Inventory\Asset\MainAsset->handlePorts()
  src\RuleImportAsset.php:969                        Glpi\Inventory\Asset\MainAsset->rulepassed()
  src\Rule.php:1525                                  RuleImportAsset->executeActions()
  src\RuleCollection.php:1625                        Rule->process()
  src\Inventory\Asset\MainAsset.php:575              RuleCollection->processAllRules()
  src\Inventory\Inventory.php:710                    Glpi\Inventory\Asset\MainAsset->handle()
  src\Inventory\Inventory.php:341                    Glpi\Inventory\Inventory->handleItem()
  src\Inventory\Request.php:360                      Glpi\Inventory\Inventory->doInventory()
  src\Inventory\Request.php:90                       Glpi\Inventory\Request->inventory()
  src\Agent\Communication\AbstractRequest.php:359    Glpi\Inventory\Request->handleAction()
  src\Agent\Communication\AbstractRequest.php:271    Glpi\Agent\Communication\AbstractRequest->handleJSONRequest()
  front\inventory.php:92                             Glpi\Agent\Communication\AbstractRequest->handleRequest()
  plugins\glpiinventory\front\communication.php:72   include_once()
  plugins\glpiinventory\index.php:45                 include_once()
  {"user":"inventory@server"}
[2023-04-17 15:24:08] glpisqllog.ERROR: DBmysql::query() in C:\inetpub\wwwroot\glpi\src\DBmysql.php line 370
  *** MySQL query error:
  SQL: INSERT INTO `glpi_ipaddresses` (`items_id`, `itemtype`, `name`, `is_dynamic`, `mainitemtype`, `mainitems_id`, `version`, `binary_0`, `binary_1`, `binary_2`, `binary_3`, `entities_id`) VALUES ('195', 'NetworkName', 'XXX.XX.XX.XXX', '1', 'Computer', '100', '4', '0', '0', '65535', '-1407560720', '1')
  Error: Out of range value for column 'binary_3' at row 1
  Backtrace :
  src\DBmysql.php:1320                               
  src\CommonDBTM.php:722                             DBmysql->insert()
  src\CommonDBTM.php:1317                            CommonDBTM->addToDB()
  src\Inventory\Asset\InventoryNetworkPort.php:328   CommonDBTM->add()
  src\Inventory\Asset\InventoryNetworkPort.php:499   Glpi\Inventory\Asset\MainAsset->addIPAddresses()
  src\Inventory\Asset\InventoryNetworkPort.php:121   Glpi\Inventory\Asset\MainAsset->handleUpdates()
  src\Inventory\Asset\MainAsset.php:816              Glpi\Inventory\Asset\MainAsset->handlePorts()
  src\RuleImportAsset.php:969                        Glpi\Inventory\Asset\MainAsset->rulepassed()
  src\Rule.php:1525                                  RuleImportAsset->executeActions()
  src\RuleCollection.php:1625                        Rule->process()
  src\Inventory\Asset\MainAsset.php:575              RuleCollection->processAllRules()
  src\Inventory\Inventory.php:710                    Glpi\Inventory\Asset\MainAsset->handle()
  src\Inventory\Inventory.php:341                    Glpi\Inventory\Inventory->handleItem()
  src\Inventory\Request.php:360                      Glpi\Inventory\Inventory->doInventory()
  src\Inventory\Request.php:90                       Glpi\Inventory\Request->inventory()
  src\Agent\Communication\AbstractRequest.php:359    Glpi\Inventory\Request->handleAction()
  src\Agent\Communication\AbstractRequest.php:271    Glpi\Agent\Communication\AbstractRequest->handleJSONRequest()
  front\inventory.php:92                             Glpi\Agent\Communication\AbstractRequest->handleRequest()
  plugins\glpiinventory\front\communication.php:72   include_once()
  plugins\glpiinventory\index.php:45                 include_once()
  {"user":"inventory@server","mem_usage":"0.059\", 27.40Mio)"}

Can you help me with this error please ?

Thank you in advance.

Offline

#2 2023-04-17 16:31:39

cedric-anne
Administrator
Registered: 2018-07-02
Posts: 85

Re: Ip address reporting problem with GLPI inventory

Hi,

Are you using a 32 bits version of PHP?

Offline

#3 2023-04-26 08:01:31

Lschmid2056
Member
Registered: 2023-04-17
Posts: 4

Re: Ip address reporting problem with GLPI inventory

Hi,

I use the version 8.0 x86

Offline

#4 2023-04-26 08:21:42

cedric-anne
Administrator
Registered: 2018-07-02
Posts: 85

Re: Ip address reporting problem with GLPI inventory

Hi,

Using the x64 version of PHP should fix this issue. This is the recommended version (see https://windows.php.net/download/).

Next GLPI version will probably drop support of 32 bits versions of PHP due to this kind of bugs (see https://github.com/glpi-project/glpi/pull/14009).

Offline

#5 2023-04-26 08:25:54

Lschmid2056
Member
Registered: 2023-04-17
Posts: 4

Re: Ip address reporting problem with GLPI inventory

Hi,

Ok, i try this version and i respond you if it's functionnaly.

Offline

#6 2023-04-26 09:35:47

Lschmid2056
Member
Registered: 2023-04-17
Posts: 4

Re: Ip address reporting problem with GLPI inventory

Hi,

Thanks you very much.

You resolve my problem.

Offline

Board footer

Powered by FluxBB