[ZBX-6165] Error While Importing Template Created: 2013 Jan 22 Updated: 2017 May 30 Resolved: 2013 Jan 30 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 2.0.4 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Gene Liverman | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | templates | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
CentOS 6.3 + EPEL, all updates applied |
Attachments: |
![]() ![]() |
||||||||
Issue Links: |
|
Description |
While attempting to import a template, I get the following error: The template I am trying to load is attached. |
Comments |
Comment by Gene Liverman [ 2013 Jan 22 ] | ||||||||
Attached screenshot of import screen. | ||||||||
Comment by richlv [ 2013 Jan 22 ] | ||||||||
have you been doing any direct database modifications now or at any point in the past ? if you do : delete from ids where table_name='hosts_groups' and field_name='hostgroupid'; does it start working ? | ||||||||
Comment by Gene Liverman [ 2013 Jan 23 ] | ||||||||
I have not. As a matter of fact, when I went from 1.8 to 2.0 I was so paranoid about messing up the DB that I did a fresh install. | ||||||||
Comment by Gene Liverman [ 2013 Jan 25 ] | ||||||||
I realized that you wanted me to run that SQL statement either way so I did. When I did it as a select statement instead I got this:
-------
------- When I ran it as a delete statement I got this: After that, I tried importing again and got this error Error in query [INSERT INTO hosts_groups (hostgroupid, hostid, groupid) VALUES (268, 10167, 1)] [Duplicate entry '10167-1' for key 'hosts_groups_1'] | ||||||||
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 28 ] | ||||||||
Did you edit the XML file by hand? It's structure is incorrect. It has multiple groups and items tags. | ||||||||
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 30 ] | ||||||||
It's a common problem with the API. When we call, for instance, host.create and pass duplicate host groups to a host, it will cause an SQL error. Same for other methods. It will be fixed in the trunk, not in 2.0. CLOSED. |