Closed ramonromancastro closed 10 months ago
Performing some tests to observe the values passed to the SQL statement, it appears that the CHECKSUM_MAX_VALUE constant has no value/is empty.
Hello,
We don't plan on supporting the GLPI Agent as an official inventory agent for OCS. I'll recommend to stick with the OCS agent (Linux / Mac / Windows).
Please note that if you switched to GLPI Agent in order to fix an issue you previously encountered on the OCS agent, we remain available for OCS agent related problems :)
Regards, Charlene Auger.
It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.
General informations
Operating system : CentOS Linux release 7.9.2009 (Core)
Server informations
Perl version : v5.16.3 Mysql / Mariadb / Percona version : MariaDB Server version 5.5.68-MariaDB
OCS Inventory informations
Ocs server version : 2.12.0
Problem's description
I am using GLPI Agent client to synchronize with several servers and one of them is OCS Inventory Server.
When synchronizing the data I get an error in the activity.log file.
This is the error trace:
[activity.log]
... Fri Jul 28 12:06:17 2023;12287;319;xxx;10.237.25.28;GLPI-Agent_v1.5-1;session;found Fri Jul 28 12:06:17 2023;12287;104;xxx;10.237.25.28;GLPI-Agent_v1.5-1;inventory;incoming Fri Jul 28 12:06:20 2023;12287;515;xxx;10.237.25.28;GLPI-Agent_v1.5-1;end;error ...
[error_log]
... DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '|CHECKSUM|1), NAME='xxx', WORKGROUP='xxx', USERDOMAIN=NULL, ' at line 4 at /usr/local/share/perl5/Apache/Ocsinventory/Server/Inventory/Update/Hardware.pm line 49. ...
I have found that the line that includes the error is
CHECKSUM=(".(defined($base->{CHECKSUM})?$base->{CHECKSUM}:CHECKSUM_MAX_VALUE)."|CHECKSUM|1)
PS: This error has happened to me in the past, but I don't remember with which agent it was.