[ZBX-11715] Database Upgrade Failure Created: 2017 Jan 19  Updated: 2017 May 30  Resolved: 2017 Jan 24

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 3.4.0alpha1
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Vladislavs Sokurenko Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: dbpatches, upgrade
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Upgrade from database version (mandatory/optional): 03030014/03030014
to required mandatory version: 03030022 fails with impossible error

 18970:20170119:135822.518 Starting Zabbix Server. Zabbix 3.3.0 (revision {ZABBIX_REVISION}).
 18970:20170119:135822.518 ****** Enabled features ******
 18970:20170119:135822.518 SNMP monitoring:            NO
 18970:20170119:135822.518 IPMI monitoring:            NO
 18970:20170119:135822.518 Web monitoring:            YES
 18970:20170119:135822.518 VMware monitoring:         YES
 18970:20170119:135822.518 SMTP authentication:       YES
 18970:20170119:135822.518 Jabber notifications:       NO
 18970:20170119:135822.518 Ez Texting notifications:  YES
 18970:20170119:135822.518 ODBC:                       NO
 18970:20170119:135822.518 SSH2 support:               NO
 18970:20170119:135822.518 IPv6 support:               NO
 18970:20170119:135822.518 TLS support:                NO
 18970:20170119:135822.518 ******************************
 18970:20170119:135822.518 using configuration file: /etc/zabbix/zabbix_server.conf
 18970:20170119:135822.521 current database version (mandatory/optional): 03030014/03030014
 18970:20170119:135822.521 required mandatory version: 03030022
 18970:20170119:135822.521 starting automatic database upgrade
 18970:20170119:135822.541 completed 12% of database upgrade
 18970:20170119:135822.557 completed 25% of database upgrade
 18970:20170119:135822.596 completed 37% of database upgrade
zabbix_server [18970]: ERROR [file:db.c,line:2035] Something impossible has just happened.

Next launch

 19335:20170119:140733.033 current database version (mandatory/optional): 03030017/03030017
 19335:20170119:140733.033 required mandatory version: 03030022
 19335:20170119:140733.033 starting automatic database upgrade
zabbix_server [19335]: ERROR [file:db.c,line:2035] Something impossible has just happened.

Seems related to https://support.zabbix.com/browse/ZBXNEXT-1443

static int	DBpatch_3030017(void)
{
	const ZBX_FIELD	field = {"itemid", NULL, "items", "itemid", 0, 0, 0, ZBX_FK_CASCADE_DELETE};

	return DBadd_foreign_key("item_preproc", 1, &field);
}

my.cnf
[mysqld]
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES



 Comments   
Comment by Vladislavs Sokurenko [ 2017 Jan 23 ]

sorry dbschema.c must be rebuilt separately it looks like I forgot to do it, that's why it couldn't find table in structure.

Generated at Thu Apr 25 15:35:58 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.