glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.35k stars 1.3k forks source link

GLPI-Agent report data not integrated into GLPI #17838

Closed fbarbieu closed 15 hours ago

fbarbieu commented 2 months ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.6 / 10.0.16

Bug description

Hello,

I was using FusionInventory for client machine reports. It worked without any problems. I replaced FusionInventory-Agent with GLPI-Agent, and disabled the FusionInventory plugin. Since then, the report data is not integrated into GLPI for several dozen machines (Windows, Debian, Kali). On the machine page, in the GLPI-Agent section, the "Last inventory" date is updated par new GLPI-Agent reports. However, "components", "softwares" ... are not updated.

I reproduce with a clone of my GLPI server, updated to V10.0.16, FusionInventory plugin disabled, deleted and cleaned. I activated debug level for logs.

It seems surprising that a text value is used for the manufacturers_id field, which is an int(10) according to the description of the glpi_softwares table. Can my problem be solved by fixing this error?

Good afternoon. Kind regards, Franck

Relevant log output

GLPI-Agent logs:
---
DEBUG: .../IO/Socket/SSL.pm:3060: free ctx 94075242626880 open=94075242626880 94075186406000
DEBUG: .../IO/Socket/SSL.pm:3064: free ctx 94075242626880 callback
DEBUG: .../IO/Socket/SSL.pm:3071: OK free ctx 94075242626880
[error] [http client] communication error: 500 Internal Server Error
DEBUG: .../IO/Socket/SSL.pm:3060: free ctx 94075186406000 open=94075186406000
DEBUG: .../IO/Socket/SSL.pm:3064: free ctx 94075186406000 callback
DEBUG: .../IO/Socket/SSL.pm:3071: OK free ctx 94075186406000
---

Apache logs:
---
[Wed Sep 11 15:43:04.505796 2024] [proxy_fcgi:error] [pid 53859] [client X.X.X.X:58565] AH01071: Got error 'PHP message: PHP Fatal error:  Incorrect integer value: 'LOGITECH' for column `glpidb`.`glpi_softwares`.`manufacturers_id` at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'
[Wed Sep 11 15:47:54.460017 2024] [proxy_fcgi:error] [pid 53724] [client X.X.X.X:59470] AH01071: Got error 'PHP message: PHP Fatal error:  Out of range value for column 'manufacturers_id' at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'
[Wed Sep 11 15:50:15.617868 2024] [proxy_fcgi:error] [pid 54260] [client X.X.X.X:63101] AH01071: Got error 'PHP message: PHP Fatal error:  Incorrect integer value: 'BROCADE' for column `glpidb`.`glpi_softwares`.`manufacturers_id` at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'
[Wed Sep 11 15:52:38.592921 2024] [proxy_fcgi:error] [pid 54420] [client X.X.X.X:37290] AH01071: Got error 'PHP message: PHP Fatal error:  Out of range value for column 'manufacturers_id' at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'
[Wed Sep 11 15:57:49.452604 2024] [proxy_fcgi:error] [pid 54665] [client X.X.X.X:62179] AH01071: Got error 'PHP message: PHP Fatal error:  Out of range value for column 'manufacturers_id' at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'
---

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

GLPI 10.0.6 Debian 12 - PHP 8.1 Activated plugins Account 3.0.3 / Print to pdf 3.0.0 Unactivated plugins FusionInventory 10.0.6+1.1

GLPI 10.0.16 Debian 12 - PHP 8.2 Activated plugins Account 3.0.4 / Print to pdf 3.0.0

Anything else?

No response

trasher commented 2 months ago

Please provide an inventory file we can use to reproduce your issue on a fresh GLPI instance.

fbarbieu commented 2 months ago

Hi Trasher, The inventory files contain data that is classified as confidential to us (computer name, domain, networks...). If I anonymize them, will that be okay? I would at least leave the software part intact. Regards Franck

trasher commented 2 months ago

Just make sure issue is reproducible with your file on a fresh install and that's OK; it's all we need.

fbarbieu commented 2 months ago

inv.zip Hello, You will find 2 anonymized inventory files (Windows and Debian) in attached files. Regards Franck

trasher commented 2 months ago

The "window" file is not XML valid, and therefore cannot be imported. I've been able to import the other one, and everything seems OK: image

fbarbieu commented 2 months ago

Hello, For the Windows file, my bad, I had removed one character too many when anonymizing. The corrected file is attached. windows_ano_v2.zip For the Debian file, do you have any idea what is causing the error message I am getting on my end? Have a good day. Franck

trasher commented 2 months ago

Hello, For the Windows file, my bad, I had removed one character too many when anonymizing. The corrected file is attached. windows_ano_v2.zip

I dot no have time right now to check again.

For the Debian file, do you have any idea what is causing the error message I am getting on my end? Have a good day. Franck

Since I have no problem on my side, no idea. Certainly something kind of wrong in your existing database, hard to say.

fbarbieu commented 2 months ago

For Windows inventories, it seems that dictionary rules on manufacturers are causing problems.

An import with "INVOKE DSI" as manufacturer does not pass with the following rule enabled:

When a deactivate it, import works. I have the same error with similar rules.

Franck

fbarbieu commented 2 months ago

For Debian inventories, the error below persists:

[Mon Sep 16 18:00:09.872792 2024] [proxy_fcgi:error] [pid 295549] [client 192.168.0.63:55586] AH01071: Got error 'PHP message: PHP Fatal error: Out of range value for column 'manufacturers_id' at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'

Franck

trasher commented 2 months ago

I did not say you do not have an error but I need a way to reproduce in order to fix. There is probably something in your setup or existing database that cause the issue. Maybe jsut a bit of "clean" is needed, can't say.

fbarbieu commented 2 months ago

Hello,

I have deactive manufacturers rules for manufacturers in errors message. The following message no longer appears: AH01071: Got error 'PHP message: PHP Fatal error: Incorrect integer value: 'BROCADE' for column glpidb.glpi_softwares.manufacturers_id at row 1 in /var/www/glpi/src/DBmysql.php on line 1969'

Only the following error still appears: AH01071: Got error 'PHP message: PHP Fatal error: Out of range value for column 'manufacturers_id' at row 1 in /var/www/glpi/src/DBmysql.php on line 1969' We have more than 3400 manufacturers in the glpi_manufacturers table of our GLPI. In the tables descriptions, manufacturers_id is a "int(10) unsigned" (glpi_manufacturers, glpi_softwares...). Could it be possible that a variable is set to an integer with too few characters?

Have a good day. Franck

github-actions[bot] commented 1 week ago

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.