Upgrading TiDB to 6.40 using tiup results in startup error: TiKV version must be greater than or equal to 6.2.0-alpha

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb 用tiup升级到6.40,启动报错 TiKV version must greater than or equal to 6.2.0-alpha

| username: leoones

[Overview] Scenario + Problem Overview
Downtime Upgrade
Error reported when upgrading from tiup v5.4.2 to 6.40
tiup cluster upgrade ak-tidb-cluster v6.4.0 --offline

| username: h5n1 | Original post link

It should be that the TiKV version 5.4 does not support a direct upgrade to 6.4. If it’s a test environment, you can try upgrading to 6.2 first and then try again.

| username: leoones | Original post link

Some have already upgraded to 6.4. How should we handle this?

| username: h5n1 | Original post link

Which components

| username: leoones | Original post link

3 TiDB & PD mixed deployment, version information, including TiKV Min Version: 6.2.0-alpha
Release Version: v6.4.0
Edition: Community
Git Commit Hash: cf36a9ce2fe1039db3cf3444d51930b887df18a1
Git Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-13 05:25:30
GoVersion: go1.19.2
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore

Release Version: v6.4.0
Edition: Community
Git Commit Hash: cf36a9ce2fe1039db3cf3444d51930b887df18a1
Git Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-13 05:25:30
GoVersion: go1.19.2
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore

Release Version: v6.4.0
Edition: Community
Git Commit Hash: cf36a9ce2fe1039db3cf3444d51930b887df18a1
Git Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-13 05:25:30
GoVersion: go1.19.2
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore

4 TiKV node version information
TiKV
Release Version: 6.4.0
Edition: Community
Git Commit Hash: af4c732c46ef62e677266e0055e2a8b50207f09c
Git Commit Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-09 06:27:32
Rust Version: rustc 1.64.0-nightly (0f4bcadb4 2022-07-30)
Enable Features: pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure
Profile: dist_release

TiKV
Release Version: 6.4.0
Edition: Community
Git Commit Hash: af4c732c46ef62e677266e0055e2a8b50207f09c
Git Commit Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-09 06:27:32
Rust Version: rustc 1.64.0-nightly (0f4bcadb4 2022-07-30)
Enable Features: pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure
Profile: dist_release

TiKV
Release Version: 6.4.0
Edition: Community
Git Commit Hash: af4c732c46ef62e677266e0055e2a8b50207f09c
Git Commit Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-09 06:27:32
Rust Version: rustc 1.64.0-nightly (0f4bcadb4 2022-07-30)
Enable Features: pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure
Profile: dist_release

TiKV
Release Version: 6.4.0
Edition: Community
Git Commit Hash: af4c732c46ef62e677266e0055e2a8b50207f09c
Git Commit Branch: heads/refs/tags/v6.4.0
UTC Build Time: 2022-11-09 06:27:32
Rust Version: rustc 1.64.0-nightly (0f4bcadb4 2022-07-30)
Enable Features: pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure
Profile: dist_release

| username: Billmay表妹 | Original post link

Is there a problem with the TiKV upgrade process, and it didn’t fully upgrade successfully?

Can you describe your upgrade process in detail?

| username: tidb狂热爱好者 | Original post link

Why are there 4 TiKVs?

| username: h5n1 | Original post link

Take a look at the tiup version, can we use this?

| username: leoones | Original post link

tiup version
[tidb@tikv1 ~]$ tiup --version
1.11.1 tiup
Go Version: go1.19.2
Git Ref: v1.11.1
GitHash: b95172df211e4f9b643590f2dd8436ad60c72b38

| username: leoones | Original post link

There is a TiKV that needs to be scaled down later.

| username: pingyu | Original post link

What does tiup cluster display output?

It looks like TiKV has already been upgraded to 6.4.0, TiDB shouldn’t be reporting errors anymore.

| username: Jiawei | Original post link

So are all the cluster nodes currently in an unstarted state? Are there any other error logs?

| username: leoones | Original post link

TiKV and PD services are up after starting, but TiDB cannot start and keeps reporting that error.

| username: leoones | Original post link

Hmm, it looks like the upgrade is okay, but there are indeed some issues.

| username: 我是咖啡哥 | Original post link

Is “tiup cluster display asinking-tidb-cluster” normal? If not, try upgrading again? :joy:

| username: leoones | Original post link

It’s still not working, the same issue persists.

| username: 裤衩儿飞上天 | Original post link

Try adding a new TiDB node to see if it helps, and get the service running first. Version 6.4 is a DMR version, so there might be more issues.

| username: leoones | Original post link

The newly expanded one also reports this error.

| username: h5n1 | Original post link

Please post all the information from tiup cluster display.

| username: 裤衩儿飞上天 | Original post link

Please post the result of tiup cluster display asinking-tidb-cluster, sensitive information can be redacted.