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 2019-09-30 01:39:13

luigi
Member
Registered: 2018-04-01
Posts: 12

sql error - Unknown column 'glpi_entities.ocsid' in 'field list'

Hello

I have problem with listing
Computers imported by automatic actions and Computers not imported by automatic actions

buttons

When I click on one of these, it is empty.

empty

When I check errors and debug mode, I see :

[2019-09-30 01:16:18] glpisqllog.ERROR: DBmysql::query() in /usr1/glpi/inc/dbmysql.class.php line 188
  *** MySQL query error:
  SQL: SELECT DISTINCT `glpi_plugin_ocsinventoryng_details`.`id` AS id, 'admrusna' AS currentuser,
                        `glpi_plugin_ocsinventoryng_details`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_details`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_plugin_ocsinventoryng_details`.`threadid`, `glpi_entities`.`completename` AS completename,
           `glpi_entities`.`ocsid` AS ocsid,
           `glpi_entities`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_entities`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_entities`.`threadid`, `glpi_plugin_ocsinventoryng_threads`.`processid` AS processid,
           `glpi_plugin_ocsinventoryng_threads`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_threads`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_plugin_ocsinventoryng_threads`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_plugin_ocsinventoryng_threads`.`threadid`, `glpi_plugin_ocsinventoryng_ocsservers`.`name` AS name,
           `glpi_plugin_ocsinventoryng_ocsservers`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_ocsservers`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_plugin_ocsinventoryng_ocsservers`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_plugin_ocsinventoryng_ocsservers`.`threadid`, `glpi_plugin_ocsinventoryng_details`.`process_time` AS process_time,
           `glpi_plugin_ocsinventoryng_details`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_plugin_ocsinventoryng_details`.`threadid`, `glpi_plugin_ocsinventoryng_details`.`action` AS action,
           `glpi_plugin_ocsinventoryng_details`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_plugin_ocsinventoryng_details`.`threadid`, `glpi_plugin_ocsinventoryng_details`.`computers_id` AS computers_id,
           `glpi_plugin_ocsinventoryng_details`.`ocsid` AS ocsid,
           `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_ocsservers_id` AS plugin_ocsinventoryng_ocsservers_id, `glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_threads_id`,
                  `glpi_plugin_ocsinventoryng_details`.`threadid` FROM `glpi_plugin_ocsinventoryng_details`LEFT JOIN `glpi_entities`
                                          ON (`glpi_plugin_ocsinventoryng_details`.`entities_id` = `glpi_entities`.`id`
                                              )LEFT JOIN `glpi_plugin_ocsinventoryng_threads`
                                          ON (`glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_threads_id` = `glpi_plugin_ocsinventoryng_threads`.`id`
                                              )LEFT JOIN `glpi_plugin_ocsinventoryng_ocsservers`
                                          ON (`glpi_plugin_ocsinventoryng_details`.`plugin_ocsinventoryng_ocsservers_id` = `glpi_plugin_ocsinventoryng_ocsservers`.`id`
                                              ) WHERE   (  1 )  ORDER BY ITEM_PluginOcsinventoryngDetail_1 ASC  LIMIT 0, 100
  Error: Unknown column 'glpi_entities.ocsid' in 'field list'
  Backtrace :
  inc/search.class.php:1246
  inc/search.class.php:98                            Search::constructData()
  inc/search.class.php:80                            Search::showList()
  plugins/ocsinventoryng/front/detail.php:36         Search::show()
  {"user":"7@ocslirazv"}

In DB there are few computers, not imported.
During update of OCSNG computers I got also error


..............................................DBmysql::query() in /usr1/glpi/inc/dbmysql.class.php line 188
  *** MySQL query error:
  SQL: INSERT INTO `glpi_plugin_ocsinventoryng_notimportedcomputers` (`name`, `domain`, `tag`, `ocs_deviceid`, `ipaddr`, `plugin_ocsinventoryng_ocsservers_id`, `ocsid`, `last_inventory`, `useragent`, `serial`, `reason`, `comment`, `entities_id`, `rules_id`) VALUES ('7XNRD82', 'domain.domain', 'NA', '7282', '172.28.5.182', '6', '469', '2019-09-29 20:18:14', '-2600', '7XNRD82', '3', '', '0', '[]')
  Error: Duplicate entry '6-469' for key 'ocs_id'
  Backtrace :
  inc/dbmysql.class.php:832
  inc/commondbtm.class.php:659                       DBmysql->insert()
  inc/commondbtm.class.php:1141                      CommonDBTM->addToDB()
  ...ventoryng/inc/notimportedcomputer.class.php:382 CommonDBTM->add()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:422 PluginOcsinventoryngNotimportedcomputer->logNotImported()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:291 plugin_ocsinventoryng_importFromOcsServer()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:164 SecondPass()

My config:
GLPI 9.4.4
Mariadb 10.2.22
OCSNG 1.6.0 for Computers
Fusion Invetnory 9.4+1.1 for VM machines, Linux servers, SNMP scans

thanks for help


GLPI 9.4.4 / SLES 12
Apache/ 2.4.16 (Linux/SUSE), php 7.0.7, MariaDB 10.0.22
Windows Servers and Windows Clients - import from OCS servers ( plugin Version: 1.6.0 )
Linux import from FusionInventory ( plugin Version: 9.4+1.1 )

Offline

Board footer

Powered by FluxBB