[ZBX-23179] Zabbix Database Import. 5.4 version to 6.4. Created: 2023 Jul 31 Updated: 2023 Aug 08 Resolved: 2023 Aug 08 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Victor Florêncio | Assignee: | Zabbix Support Team |
Resolution: | Commercial support required | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Hi everyone. I've tried to update my Zabbix 5.4 to 6.4 version. Scenario: 1 - We had an old Centos 7 with Zabbix 5.4 2 - I started up a new server Centos 9 3 - Configured the new server with Zabbix Settings (6.4) to receive the Database from the Zabbix 5.4 4 - I finished the database import: mysql -u root zabbix < /bkpzabbix/zabbix_backup.sql 5 - update dbversion set mandatory=06040000,optional=06040000; 6 - The Zabbix Database Update automatic didn't occurr as expected 7 - Received the log below: 24235:20230731:144350.606 using configuration file: /etc/zabbix/zabbix_server.conf 24235:20230731:144350.817 current database version (mandatory/optional): 06040000/06040000 24235:20230731:144350.817 required mandatory version: 06040000 24235:20230731:144350.817 optional patches were found 24235:20230731:144350.817 starting automatic database upgrade 24235:20230731:144350.832 [Z3005] query failed: [1072] Key column 'cause_eventid' doesn't exist in table [create index problem_4 on problem (cause_eventid)] 24235:20230731:144350.832 database upgrade failed on patch 06040001, exiting in 10 seconds 8 - It's not seems related with 'history' entries in database problems (I tried to prepare the database before de import again: mysql -u zabbix -p zabbix < /usr/share/zabbix-sql-scripts/mysql/history_pk_prepare.sql 9 - Same log errors as the step 7. I don't know where to go here. Can someone help me to proceed please? thanks.
I don't k |
Comments |
Comment by Victor Florêncio [ 2023 Jul 31 ] |
More informations: mysql> show columns from zabbix.opcommand; +-------------+-----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-----------------+------+-----+---------+-------+ | operationid | bigint unsigned | NO | PRI | NULL | | | type | int | NO | | 0 | | | scriptid | bigint unsigned | NO | MUL | NULL | | | execute_on | int | NO | | 0 | | | port | varchar(64) | NO | | | | | authtype | int | NO | | 0 | | | username | varchar(64) | NO | | | | | password | varchar(64) | NO | | | | | publickey | varchar(64) | NO | | | | | privatekey | varchar(64) | NO | | | | | command | text | NO | | NULL | | +-------------+-----------------+------+-----+---------+-------+ |
Comment by Edgar Akhmetshin [ 2023 Aug 01 ] |
Hello Step 5 is not needed and incorrect since Zabbix Server binary will do the database upgrade itself. Doing this manually without proper knowledge just skips all the the upgrade and you have this errors. Upgrade procedure: Be advised that this section of the tracker is for bug reports only. The case you have submitted can not be qualified as one, so please reach out to [email protected] for commercial support (https://zabbix.com/support) or consultancy services. Alternatively, you can also use our IRC channel or community forum (https://www.zabbix.com/forum) for assistance. With that said, we are closing this ticket. Thank you for understanding. Regards, |
Comment by Victor Florêncio [ 2023 Aug 01 ] |
Hi Edgar. I've tried that too, check the result. I couldn't proceed also.
36305:20230801:085731.865 IPv6 support: YES 36305:20230801:085731.865 TLS support: YES 36305:20230801:085731.865 ****************************** 36305:20230801:085731.865 using configuration file: /etc/zabbix/zabbix_server.conf 36305:20230801:085731.884 current database version (mandatory/optional): 05000000/05000005 36305:20230801:085731.884 required mandatory version: 06040000 36305:20230801:085731.884 mandatory patches were found 36305:20230801:085731.886 [Z3005] query failed: [1054] Unknown column 'ha_failover_delay' in 'field list' [select unix_timestamp(),ha_failover_delay from config] 36305:20230801:085731.886 cannot retrieve database time 36305:20230801:085731.886 Zabbix Server stopped. Zabbix 6.4.4 (revision a749236b3d9).
What am I missing here? |
Comment by Victor Florêncio [ 2023 Aug 01 ] |
Hi Edgar. I've tried that too, check the result. I couldn't proceed also.
36305:20230801:085731.865 IPv6 support: YES 36305:20230801:085731.865 TLS support: YES 36305:20230801:085731.865 ****************************** 36305:20230801:085731.865 using configuration file: /etc/zabbix/zabbix_server.conf 36305:20230801:085731.884 current database version (mandatory/optional): 05000000/05000005 36305:20230801:085731.884 required mandatory version: 06040000 36305:20230801:085731.884 mandatory patches were found 36305:20230801:085731.886 [Z3005] query failed: [1054] Unknown column 'ha_failover_delay' in 'field list' [select unix_timestamp(),ha_failover_delay from config] 36305:20230801:085731.886 cannot retrieve database time 36305:20230801:085731.886 Zabbix Server stopped. Zabbix 6.4.4 (revision a749236b3d9).
What am I missing here? |
Comment by Edgar Akhmetshin [ 2023 Aug 02 ] |
Do not touch dbversion table. 36305:20230801:085731.884 current database version (mandatory/optional): 05000000/05000005 This is not 5.4 vanilla version number. Revert back database state from the backup and start over without dbversion table manual changes. Be advised that this section of the tracker is for bug reports only. The case you have submitted can not be qualified as one, so please reach out to [email protected] for commercial support (https://zabbix.com/support) or consultancy services. Alternatively, you can also use our IRC channel or community forum (https://www.zabbix.com/forum) for assistance. With that said, we are closing this ticket. Thank you for understanding. Closing as "Commercial support required". |
Comment by Victor Florêncio [ 2023 Aug 07 ] |
Edgar, Hi. I reimported the database and didn`t change the version. Tried to start the zabbix-server and I got those logs below: 41947:20230807:080650.139 IPv6 support: YES What Can I do from here? |
Comment by Victor Florêncio [ 2023 Aug 07 ] |
I created a COLUMN 'ha_failover_delay in MySQL and proceed:
3838:20230807:095511.668 7fd9dfdba000-7fd9dfdbc000 r--p 00033000 fd:00 805308634 /usr/lib64/ld-linux-x86-64.so.2
Now I'm getting this errors. |
Comment by Victor Florêncio [ 2023 Aug 07 ] |
I Also got this at the beginning of zabbix_server.log: 2709:20230807:090758.896 using configuration file: /etc/zabbix/zabbix_server.conf |
Comment by Victor Florêncio [ 2023 Aug 07 ] |
Backtrace:
4184:20230807:101206.288 === Backtrace: === |
Comment by Ilja Fedotjevs [ 2023 Aug 08 ] |
Dear Victor, BR, Zabbix support |