[ZBX-14865] importing template error - Field "parent_itemid" cannot be set to NULL Created: 2018 Sep 17  Updated: 2024 Apr 10  Resolved: 2018 Oct 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 3.4.14, 4.0.0rc1
Fix Version/s: 3.4.15rc1, 4.0.1rc1, 4.2.0alpha1, 4.2 (plan)

Type: Problem report Priority: Trivial
Reporter: Vitaly Zhuravlev Assignee: Alexander Vladishev
Resolution: Fixed Votes: 0
Labels: Template_Net_Cisco_IOS_SNMPv2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2018-09-17-18-44-00-928.png    
Issue Links:
Causes
caused by ZBX-6118 Very low performance changing templat... Closed
Duplicate
is duplicated by ZBX-14959 "Undefined offset" when importing a t... Closed
Team: Team B
Sprint: Sprint 43, Sprint 44
Story Points: 0.5

 Description   

Please help to find out why there is an error when trying to import Template Net Cisco * configuration. Is this an error with template of configuration import API?

Steps to reproduce:

  • delete all default templates that start with Template Module Cisco... and Template Net Cisco
  • import xml templates from file: svn://svn.zabbix.com/trunk/templates/net/template_net_cisco_SNMPv2_EN.xml

Result:
Error is seen:

Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10236 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Undefined offset: 10238 [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1080]
Field "parent_itemid" cannot be set to NULL.

Expected:
Templates are imported

More info:
https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/360101-importing-template-error-field-parent_itemid-cannot-be-set-to-null



 Comments   
Comment by Andrejs Griščenko [ 2018 Sep 27 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-14865

Comment by Alexander Vladishev [ 2018 Oct 10 ]

Fixed in:

  • 3.4.15rc1 r85650
  • 4.0.1rc1 r85651
  • 4.2.0alpha1 (trunk) r85652
Generated at Thu Apr 25 11:10:03 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.