Closed Blank-Vcf closed 1 year ago
have some error in sql like this:
[2022-07-15 17:13:21] glpisqllog.ERROR: DBmysql::query() in /var/www/src/DBmysql.php line 370
*** MySQL query error:
SQL: SELECT glpi_lines
.id
FROM glpi_lines
WHERE (glpi_lines
.serial
= 'PC08AMUJ')
Error: Unknown column 'glpi_lines.serial' in 'where clause'
Backtrace :
src/DBmysqlIterator.php:110
src/DBmysql.php:1048 DBmysqlIterator->execute()
src/RuleImportAsset.php:540 DBmysql->request()
src/Rule.php:1649 RuleImportAsset->findWithGlobalCriteria()
src/Rule.php:1507 Rule->checkCriterias()
src/RuleCollection.php:1591 Rule->process()
...ins/ocsinventoryng/inc/ocsprocess.class.php:580 RuleCollection->processAllRules()
...ins/ocsinventoryng/inc/ocsprocess.class.php:482 PluginOcsinventoryngOcsProcess::importComputer()
...s/ocsinventoryng/scripts/ocsng_fullsync.php:454 PluginOcsinventoryngOcsProcess::processComputer()
...s/ocsinventoryng/scripts/ocsng_fullsync.php:303 plugin_ocsinventoryng_importFromOcsServer()
...s/ocsinventoryng/scripts/ocsng_fullsync.php:185 SecondPass()
get it to work after somme other issue same as:
on clone dev server after update glpi to 10.0.3 remove plugin clean db (drop ocs plugin tables) reinstall plugin from market,update hook.php to install work
//Add template
$query = "INSERT INTO `glpi_notificationtemplates` (id, name, itemtype,date_mod,comment,css,date_creation)
VALUES (NULL, 'Computers not imported', 'PluginOcsinventoryngNotimportedcomputer',NOW(), 'ocs', NULL,NOW());";
reconfigure ocs server + rule and import preview is working
I was wrong finally, after cleanup prod server and reconfigure from scratch still the same problem. Also on dev, i have only try with 1 ocs server but after added the second server, rules still not match on assign to entity. same by changing rules order. the error "database table warning" should come from memory configuration ini php.ini
i get a disgusting things to work: remove third ocs 'useless' server make first rule what come from ocs server Z go to entity Z make second rule what not come from ocs server Z assign to entity Y
by the way on ~2400 computers from ocs Y ~15 computer match first rule :S if i add tag on rule criteria no rule match 👎
Please try with master version ? https://github.com/pluginsGLPI/ocsinventoryng/archive/refs/heads/master.zip
seems ok, but there no more preview button cannot check without import if entity and link with existing computer are ok. still a common problem computer are never link if it's ok in preview, it's always ending by making doublon.
I temporarily disabled it for performance issues
fixed in 2.0.4
before: glpi 9.5.7 ocs plugin 1.7.3
have 2 ocs server, preview assignment on glpi 9.5
rules are easy if server ocs is > assign to this entity
upgrade to: glpi 10.2 ocs plugun 2.0.1
assignment is working well for the fisrt ocs server:
switching to second rules doesn't match:
i have check rules > still ok ocs config plugin > still the same
i have deleted ocs conf and rules and re create fro scratch: since there is tons a machine, preview crash: without preview i'm seeing all comp but import failed with no rules match:
sync with command line: if I'll force with shell it doesn't care of --server_id and start sync with first server: popping tons of errors:
and finally does the second:
nothing is added to computer and machine still in import list