[ZBX-11264] Upgrade from 2.4.8 to 3.x Created: 2016 Sep 26  Updated: 2017 Nov 28  Resolved: 2017 Nov 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: 2.4.8, 3.0.4
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Moscwin Valera Assignee: Unassigned
Resolution: Workaround proposed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos7 x64, zabbix 2.4.8


Attachments: Zip Archive zabbix_server.zip    
Issue Links:
Duplicate
is duplicated by ZBX-11279 Upgrade Database fails from 3.0 to 3.2 Closed

 Description   

After upgrade I'm start zabbix-server, and get error

 12515:20160926:055040.528 Starting Zabbix Server. Zabbix 3.0.4 (revision 61185).
 12515:20160926:055040.528 ****** Enabled features ******
 12515:20160926:055040.528 SNMP monitoring:           YES
 12515:20160926:055040.528 IPMI monitoring:           YES
 12515:20160926:055040.528 Web monitoring:            YES
 12515:20160926:055040.528 VMware monitoring:         YES
 12515:20160926:055040.528 SMTP authentication:       YES
 12515:20160926:055040.528 Jabber notifications:      YES
 12515:20160926:055040.528 Ez Texting notifications:  YES
 12515:20160926:055040.528 ODBC:                      YES
 12515:20160926:055040.528 SSH2 support:              YES
 12515:20160926:055040.528 IPv6 support:              YES
 12515:20160926:055040.528 TLS support:               YES
 12515:20160926:055040.528 ******************************
 12515:20160926:055040.528 using configuration file: /etc/zabbix/zabbix_server.conf
 12515:20160926:055040.534 current database version (mandatory/optional): 02050029/02050029
 12515:20160926:055040.534 required mandatory version: 03000000
 12515:20160926:055040.534 starting automatic database upgrade
 12515:20160926:055040.535 [Z3005] query failed: [1050] Table 'application_prototype' already exists [create table application_prototype (
application_prototypeid bigint unsigned not null,
itemid bigint unsigned not null,
templateid bigint unsigned,
name varchar(255) default '' not null,
primary key (application_prototypeid)
) engine=innodb]
 12515:20160926:055040.535 database upgrade failed

I read latest message in forum, but I did not found way how to fix this problem



 Comments   
Comment by Glebs Ivanovskis (Inactive) [ 2016 Sep 26 ]

Looks like server was restarted mid-upgrade (server has just started and current DB version is 02050029). Was it killed like in ZBX-11203? Can you show more log?

Comment by Moscwin Valera [ 2016 Sep 26 ]

14292:20160926:062104.030 Starting Zabbix Server. Zabbix 3.0.4 (revision 61185).
14292:20160926:062104.030 ****** Enabled features ******
14292:20160926:062104.030 SNMP monitoring: YES
14292:20160926:062104.030 IPMI monitoring: YES
14292:20160926:062104.030 Web monitoring: YES
14292:20160926:062104.030 VMware monitoring: YES
14292:20160926:062104.030 SMTP authentication: YES
14292:20160926:062104.030 Jabber notifications: YES
14292:20160926:062104.030 Ez Texting notifications: YES
14292:20160926:062104.030 ODBC: YES
14292:20160926:062104.030 SSH2 support: YES
14292:20160926:062104.030 IPv6 support: YES
14292:20160926:062104.030 TLS support: YES
14292:20160926:062104.030 ******************************
14292:20160926:062104.030 using configuration file: /etc/zabbix/zabbix_server.conf
14292:20160926:062104.037 current database version (mandatory/optional): 02050029/02050029
14292:20160926:062104.037 required mandatory version: 03000000
14292:20160926:062104.037 starting automatic database upgrade
14292:20160926:062104.037 [Z3005] query failed: [1050] Table 'application_prototype' already exists [create table application_prototype (
application_prototypeid bigint unsigned not null,
itemid bigint unsigned not null,
templateid bigint unsigned,
name varchar(255) default '' not null,
primary key (application_prototypeid)
) engine=innodb]
14292:20160926:062104.037 database upgrade failed
14301:20160926:062114.275 Starting Zabbix Server. Zabbix 3.0.4 (revision 61185).
14301:20160926:062114.275 ****** Enabled features ******
14301:20160926:062114.275 SNMP monitoring: YES
14301:20160926:062114.275 IPMI monitoring: YES
14301:20160926:062114.275 Web monitoring: YES
14301:20160926:062114.275 VMware monitoring: YES
14301:20160926:062114.275 SMTP authentication: YES
14301:20160926:062114.275 Jabber notifications: YES
14301:20160926:062114.275 Ez Texting notifications: YES
14301:20160926:062114.275 ODBC: YES
14301:20160926:062114.275 SSH2 support: YES
14301:20160926:062114.275 IPv6 support: YES
14301:20160926:062114.275 TLS support: YES
14301:20160926:062114.275 ******************************
14301:20160926:062114.275 using configuration file: /etc/zabbix/zabbix_server.conf
14301:20160926:062114.279 current database version (mandatory/optional): 02050029/02050029
14301:20160926:062114.279 required mandatory version: 03000000
14301:20160926:062114.279 starting automatic database upgrade
14301:20160926:062114.279 [Z3005] query failed: [1050] Table 'application_prototype' already exists [create table application_prototype (
application_prototypeid bigint unsigned not null,
itemid bigint unsigned not null,
templateid bigint unsigned,
name varchar(255) default '' not null,
primary key (application_prototypeid)
) engine=innodb]
14301:20160926:062114.279 database upgrade failed

Comment by Glebs Ivanovskis (Inactive) [ 2016 Sep 26 ]

I'm more interested in what was before the errors started.

Comment by Moscwin Valera [ 2016 Sep 26 ]

See log in attach.

I my second try upgrade zabbix from 2.4.x to 3.x First one been and june.

Comment by Glebs Ivanovskis (Inactive) [ 2016 Sep 26 ]

Is it a vanilla Zabbix database?

Comment by Moscwin Valera [ 2016 Sep 26 ]

Sorry, but I'm not understand what mean when wrote "vanilla"

Comment by Glebs Ivanovskis (Inactive) [ 2016 Sep 26 ]

Have you modified database schema? Where did application_prototype table come from? Please show the output of describe application_prototype;

Comment by Moscwin Valera [ 2016 Sep 26 ]

I can give you dump? I was use in 2.4.8 only imap plugin.
I have dump from 2.4.8 Attach it to you?

Comment by Steiner Acedo [ 2017 Jan 22 ]

Hi, maybe I can help you with this. I had the same problem and actually was really silly. What I've done is that I installed a new and fresh Zabbix instance in a new server and use the mysql templates that came within /usr/share/doc/zabbix-server-mysql/create.sql.gz. After that I took the MySQL dump that I did from the OLD Zabbix Server and loaded in this new server. Then when I started the zabbix-server service I've got the same error that you have reported. If you notice the error and compare the OLD tables with the new tables, the 'application_prototype' doesn't exist (and many others) but it is created by the create.sql.gz templates.

If you did the same thing all that you have to do is to DROP de zabbix database, create it again and load the OLD dump, then start the service. You should not load the create.sql.gz templates.

Hope this could be usefull to you.

Comment by Ingus Vilnis [ 2017 Nov 28 ]

Closing an old issue as Workaround proposed as per the last comment.

Generated at Thu Apr 10 23:50:05 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.