Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17931

Multiple errors when importing an updated version of a template (with delete missing items checked)

XMLWordPrintable

    • Sprint 65 (Jun 2020), Sprint 66 (Jul 2020)
    • 1

      Problem description: When attempting to import the newest version of the template_os_linux.xml template to the latest 5.0.2rc1 release with checkbox delete missing items set, import fails with multiple undefined offset errors.

      Steps to reproduce:

      1. Open zabbix frontend with the latest 5.0.2rc1 release
      2. Download the template_os_linux.xml template from the correspondign branch in GIT
      3. Attempt to import this template with the option "delete missing" set for template items.

      Result: Multiple undefined offset errors are observed:

      Undefined offset: 29228 [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->updateEntitiesWithDependency() → CItemPrototype->update() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemPrototype->updateReal() in include/classes/api/services/CItemPrototype.php:588]
      Trying to access array offset on value of type null [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->updateEntitiesWithDependency() → CItemPrototype->update() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemPrototype->updateReal() in include/classes/api/services/CItemPrototype.php:588]
      pg_query(): Query failed: ERROR: invalid input syntax for integer: ""
      LINE 1: ...otypeid=iap.application_prototypeid AND ap.itemid='' AND iap...
      ^ [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->updateEntitiesWithDependency() → CItemPrototype->update() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemPrototype->updateReal() → DBselect() → pg_query() in include/db.inc.php:247]
      Error in query [SELECT DISTINCT ap.application_prototypeid,ap.name,ap.templateid,iap.item_application_prototypeid FROM application_prototype ap,item_application_prototype iap WHERE ap.application_prototypeid=iap.application_prototypeid AND ap.itemid='' AND iap.itemid='29228'] [ERROR: invalid input syntax for integer: ""
      LINE 1: ...otypeid=iap.application_prototypeid AND ap.itemid='' AND iap...
      ^]
      pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->updateEntitiesWithDependency() → CItemPrototype->update() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemPrototype->updateReal() → DBselect() → pg_query() in include/db.inc.php:247]
      Error in query [SELECT ap.application_prototypeid,ap.name,ap.templateid FROM application_prototype ap WHERE ap.itemid='' AND ap.name='Disk {#DEVNAME}'] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
      pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->updateEntitiesWithDependency() → CItemPrototype->update() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemPrototype->updateReal() → DB::insertBatch() → DB::reserveIds() → DBselect() → pg_query() in include/db.inc.php:247]
      Error in query [SELECT nextid FROM ids WHERE table_name='application_prototype' AND field_name='application_prototypeid' FOR UPDATE] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
      pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->updateEntitiesWithDependency() → CItemPrototype->update() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemPrototype->updateReal() → DB::insertBatch() → DB::reserveIds() → DBexecute() → pg_query() in include/db.inc.php:348]
      Error in query [SELECT nextid FROM ids WHERE table_name='application_prototype' AND field_name='application_prototypeid' FOR UPDATE] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
      Your database is not working properly. Please wait a few minutes and try to repeat this action. If the problem still persists, please contact system administrator. The problem might be caused by long running transaction or row level lock accomplished by your database management system.
      

      Expected: Template should be successfully imported, items that were not included in the latest version of the template should not be present.

        1. 2020-07-01_14-27-31.png
          116 kB
          Mārtiņš Tālbergs
        2. image-2020-07-02-12-35-26-264.png
          21 kB
          Mārtiņš Tālbergs

            vmurzins Valdis Murzins
            solonkins Sergejs Olonkins
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: