pluginsGLPI / ocsinventoryng

Plugin ocsinventoryng for GLPI
GNU General Public License v2.0
68 stars 52 forks source link

Script ocsng_fullsync.sh not working #351

Open s3rgi opened 1 year ago

s3rgi commented 1 year ago

Sync script "ocsng_fullsync.sh" not working. Through the web interface I can import new machines perfectly. When ran the script with the "--debug" option and it returns this message:

Sun Mar 5 13:32:56 CET 2023 /var/www/glpi/plugins/ocsinventoryng/scripts/ocsng_fullsync.sh started
Manage delete items in OCS server #5: "OCS IMAS"
=====================================================
Thread #1: starting (1/4)
Thread #1: import computers from server: 'OCS IMAS'
SQL Warnings:
1292: Incorrect datetime value: 'NOW()'
in query "SELECT DISTINCT `hardware`.`ID`,`hardware`.`LASTDATE`,`hardware`.`NAME` FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (`hardware`.`LASTDATE` > '2023-03-05 12:53:18')  AND (`hardware`.`LASTDATE` < 'NOW()')  ORDER BY  LASTDATE   "
SQL Warnings:
1292: Incorrect datetime value: 'NOW()'
in query "SELECT count(DISTINCT `hardware`.`ID`) as total FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (`hardware`.`LASTDATE` > '2023-03-05 12:53:18')  AND (`hardware`.`LASTDATE` < 'NOW()') "
SQL Warnings:
1292: Incorrect datetime value: 'NOW()'
in query "SELECT DISTINCT `hardware`.`ID`,`hardware`.`LASTDATE`,`hardware`.`NAME` FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (('524287' & `hardware`.`CHECKSUM`) > 1) AND (`hardware`.`LASTDATE` < 'NOW()')  ORDER BY  LASTDATE   "
SQL Warnings:
1292: Incorrect datetime value: 'NOW()'
in query "SELECT count(DISTINCT `hardware`.`ID`) as total FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (('524287' & `hardware`.`CHECKSUM`) > 1) AND (`hardware`.`LASTDATE` < 'NOW()') "
Thread #1: 0 computer(s)
Thread #1: done!!

and don't synchronize any machine.

whasf commented 9 months ago

I am seeing the same thing, GLPI 10.0.10, OCS plugin version 2.04