经过测试,在线升级成功。
测试过程:
1.切换为在线mirror,升级tiup;看tiup 版本未变;但还是下载并提示升级成功,why?
[root@tidb40 ~]# tiup mirror show
/tidb-data/tiupmirror
[root@tidb40 ~]# tiup list tikv
Available versions for tikv:
Version Installed Release Platforms
------- --------- ------- ---------
v6.1.0 YES 2022-06-13T12:20:53+08:00 linux/amd64
v8.5.1 YES 2025-01-17T07:49:04Z linux/amd64
v9.0.0-beta.1.pre-nightly YES 2025-03-14T11:40:59Z linux/amd64
[root@tidb40 ~]# tiup mirror set --reset
WARN: adding root certificate via internet: https://tiup-mirrors.pingcap.com/root.json
You can revoke this by remove /root/.tiup/bin/4c18ab4179e55f01.root.json
Successfully set mirror to https://tiup-mirrors.pingcap.com/
[root@tidb40 ~]#
[root@tidb40 ~]# tiup update --self
download https://tiup-mirrors.pingcap.com/tiup-v1.16.1-linux-amd64.tar.gz 5.03 MiB / 5.03 MiB 100.00% 9.13 MiB/s
Updated successfully!
[root@tidb40 ~]# tiup update cluster
component cluster version v1.16.1 is already installed
Updated successfully!
[root@tidb40 ~]# tiup -v
1.16.1 tiup
Go Version: go1.21.13
Git Ref: v1.16.1
GitHash: 775384c48a95f7047c016cbf2905eec1e267f629
[root@tidb40 ~]#
检查本地离线镜像,均已下载,
[root@tidb40 ~]# tiup list tikv
…………
v9.0.0-beta.1.pre-nightly YES 2025-03-21T12:20:22Z darwin/arm64,linux/amd64,linux/arm64,darwin/amd64
[root@tidb40 ~]# tiup list pd
………………
v9.0.0-beta.1.pre-nightly YES 2025-03-24T09:29:48Z darwin/amd64,darwin/arm64,linux/amd64,linux/arm64
2. 切换为本地源,离线升级,失败;
# tiup mirror set /tidb-data/tiupmirror/
[root@tidb40 ~]# tiup cluster upgrade tidb-test v9.0.0-beta.1.pre-nightly
Before the upgrade, it is recommended to read the upgrade guide at https://docs.pingcap.com/tidb/stable/upgrade-tidb-using-tiup and finish the preparation steps.
This operation will upgrade tidb v8.5.1 cluster tidb-test to v9.0.0-beta.1.pre-nightly:
will upgrade and restart component " tiflash" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " cdc" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " pd" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " tikv" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " tidb" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " prometheus" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " grafana" to "v9.0.0-beta.1.pre-nightly",
will upgrade component "node-exporter" to "",
will upgrade component "blackbox-exporter" to "".
Do you want to continue? [y/N]:(default=N) y
Upgrading cluster...
+ [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa, publicKey=/root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [ Serial ] - Download: component=tikv, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tidb, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tiflash, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=pd, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=cdc, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=prometheus, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=grafana, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
download monitored
- Download node_exporter: (linux/amd64) ... Done
- Download blackbox_exporter: (linux/amd64) ... Done
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/pd-2379'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8300'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8301'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8302'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tiflash-9000'
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8300
+ [ Serial ] - BackupComponent: component=tiflash, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tiflash-9000
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8301
+ [ Serial ] - BackupComponent: component=pd, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/pd-2379
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8302
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8300 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8301 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=pd, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/pd-2379 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tiflash, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tiflash-9000 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8302 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/pd-2379.service, deploy_dir=/tidb-deploy/pd-2379, data_dir=[/tidb-data/pd-2379], log_dir=/tidb-deploy/pd-2379/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/cdc-8300.service, deploy_dir=/tidb-deploy/cdc-8300, data_dir=[/tidb-data/cdc-8300], log_dir=/tidb-deploy/cdc-8300/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/cdc-8302.service, deploy_dir=/tidb-deploy/cdc-8302, data_dir=[/tidb-data/cdc-8302], log_dir=/tidb-deploy/cdc-8302/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/cdc-8301.service, deploy_dir=/tidb-deploy/cdc-8301, data_dir=[/tidb-data/cdc-8301], log_dir=/tidb-deploy/cdc-8301/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20160'
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20160
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20160 os=linux, arch=amd64
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20161'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20162'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories=''
+ [ Serial ] - BackupComponent: component=tidb, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tidb-4000
+ [ Serial ] - CopyComponent: component=tidb, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tidb-4000 os=linux, arch=amd64
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20161
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20162
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20161 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20162 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tidb-4000.service, deploy_dir=/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb-deploy/tidb-4000/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tiflash-9000.service, deploy_dir=/tidb-deploy/tiflash-9000, data_dir=[/tidb-data/tiflash-9000], log_dir=/tidb-deploy/tiflash-9000/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tikv-20160.service, deploy_dir=/tidb-deploy/tikv-20160, data_dir=[/tidb-data/tikv-20160], log_dir=/tidb-deploy/tikv-20160/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/prometheus-9090'
+ [ Serial ] - BackupComponent: component=prometheus, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/prometheus-9090
+ [ Serial ] - Mkdir: host=192.168.169.40, directories=''
+ [ Serial ] - BackupComponent: component=grafana, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/grafana-3000
+ [ Serial ] - CopyComponent: component=prometheus, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/prometheus-9090 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tikv-20161.service, deploy_dir=/tidb-deploy/tikv-20161, data_dir=[/tidb-data/tikv-20161], log_dir=/tidb-deploy/tikv-20161/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tikv-20162.service, deploy_dir=/tidb-deploy/tikv-20162, data_dir=[/tidb-data/tikv-20162], log_dir=/tidb-deploy/tikv-20162/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - CopyComponent: component=grafana, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/grafana-3000 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/grafana-3000.service, deploy_dir=/tidb-deploy/grafana-3000, data_dir=[], log_dir=/tidb-deploy/grafana-3000/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/prometheus-9090.service, deploy_dir=/tidb-deploy/prometheus-9090, data_dir=[/tidb-data/prometheus-9090], log_dir=/tidb-deploy/prometheus-9090/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
Error: init config failed: 192.168.169.40:2379: component pd does not have nightly on linux/amd64: unknown version: check config failed
Verbose debug logs has been written to /root/.tiup/logs/tiup-cluster-debug-2025-03-26-13-49-45.log.
3. 切换为在线mirror,在线升级失败:
[root@tidb40 ~]# tiup mirror set --reset
Successfully set mirror to https://tiup-mirrors.pingcap.com/
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]# export http_proxy="192.168.118.199:808"
export https_proxy="192.168.118.199:808"
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]#
[root@tidb40 ~]# tiup cluster upgrade tidb-test v9.0.0-beta.1.pre-nightly
Checking updates for component cluster... Timedout (after 2s)
Before the upgrade, it is recommended to read the upgrade guide at https://docs.pingcap.com/tidb/stable/upgrade-tidb-using-tiup and finish the preparation steps.
This operation will upgrade tidb v8.5.1 cluster tidb-test to v9.0.0-beta.1.pre-nightly:
will upgrade and restart component " tiflash" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " cdc" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " pd" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " tikv" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " tidb" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " prometheus" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " grafana" to "v9.0.0-beta.1.pre-nightly",
will upgrade component "node-exporter" to "",
will upgrade component "blackbox-exporter" to "".
Do you want to continue? [y/N]:(default=N) y
Upgrading cluster...
+ [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa, publicKey=/root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [ Serial ] - Download: component=tidb, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=cdc, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tiflash, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=pd, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tikv, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=prometheus, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=grafana, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
download monitored
- Download node_exporter: (linux/amd64) ... Done
- Download blackbox_exporter: (linux/amd64) ... Done
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/pd-2379'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8300'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8302'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tiflash-9000'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8301'
+ [ Serial ] - BackupComponent: component=tiflash, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tiflash-9000
+ [ Serial ] - BackupComponent: component=pd, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/pd-2379
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8302
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8301
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8300
+ [ Serial ] - CopyComponent: component=tiflash, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tiflash-9000 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8302 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8301 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8300 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=pd, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/pd-2379 os=linux, arch=amd64
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20160'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20161'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20162'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories=''
+ [ Serial ] - BackupComponent: component=tidb, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tidb-4000
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/prometheus-9090'
+ [ Serial ] - CopyComponent: component=tidb, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tidb-4000 os=linux, arch=amd64
+ [ Serial ] - Mkdir: host=192.168.169.40, directories=''
+ [ Serial ] - BackupComponent: component=grafana, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/grafana-3000
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20160
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20161
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20162
+ [ Serial ] - BackupComponent: component=prometheus, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/prometheus-9090
+ [ Serial ] - CopyComponent: component=grafana, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/grafana-3000 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20160 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20161 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20162 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=prometheus, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/prometheus-9090 os=linux, arch=amd64
Error: failed to scp /root/.tiup/storage/cluster/packages/tiflash-v9.0.0-beta.1.pre-nightly-linux-amd64.tar.gz to 192.168.169.40:/tidb-deploy/tiflash-9000/bin/tiflash-v9.0.0-beta.1.pre-nightly-linux-amd64.tar.gz: failed to scp /root/.tiup/storage/cluster/packages/tiflash-v9.0.0-beta.1.pre-nightly-linux-amd64.tar.gz to tidb@192.168.169.40:/tidb-deploy/tiflash-9000/bin/tiflash-v9.0.0-beta.1.pre-nightly-linux-amd64.tar.gz: open /root/.tiup/storage/cluster/packages/tiflash-v9.0.0-beta.1.pre-nightly-linux-amd64.tar.gz: no such file or directory
Verbose debug logs has been written to /root/.tiup/logs/tiup-cluster-debug-2025-03-26-13-58-08.log.
4. 关闭集群,重启系统,再次在线升级,成功;
[root@tidb40 ~]# tiup cluster upgrade tidb-test v9.0.0-beta.1.pre-nightly
Checking updates for component cluster... Timedout (after 2s)
Before the upgrade, it is recommended to read the upgrade guide at https://docs.pingcap.com/tidb/stable/upgrade-tidb-using-tiup and finish the preparation steps.
This operation will upgrade tidb v8.5.1 cluster tidb-test to v9.0.0-beta.1.pre-nightly:
will upgrade and restart component " tiflash" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " cdc" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " pd" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " tikv" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " tidb" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " prometheus" to "v9.0.0-beta.1.pre-nightly",
will upgrade and restart component " grafana" to "v9.0.0-beta.1.pre-nightly",
will upgrade component "node-exporter" to "",
will upgrade component "blackbox-exporter" to "".
Do you want to continue? [y/N]:(default=N) y
Upgrading cluster...
+ [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa, publicKey=/root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [Parallel] - UserSSH: user=tidb, host=192.168.169.40
+ [ Serial ] - Download: component=pd, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tiflash, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=cdc, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tikv, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=tidb, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=prometheus, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
+ [ Serial ] - Download: component=grafana, version=v9.0.0-beta.1.pre-nightly, os=linux, arch=amd64
download monitored
- Download node_exporter: (linux/amd64) ... Done
- Download blackbox_exporter: (linux/amd64) ... Done
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/pd-2379'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tiflash-9000'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8301'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8300'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/cdc-8302'
+ [ Serial ] - BackupComponent: component=pd, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/pd-2379
+ [ Serial ] - BackupComponent: component=tiflash, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tiflash-9000
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8301
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8302
+ [ Serial ] - BackupComponent: component=cdc, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/cdc-8300
+ [ Serial ] - CopyComponent: component=pd, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/pd-2379 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tiflash, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tiflash-9000 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8302 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8301 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=cdc, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/cdc-8300 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/pd-2379.service, deploy_dir=/tidb-deploy/pd-2379, data_dir=[/tidb-data/pd-2379], log_dir=/tidb-deploy/pd-2379/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/cdc-8301.service, deploy_dir=/tidb-deploy/cdc-8301, data_dir=[/tidb-data/cdc-8301], log_dir=/tidb-deploy/cdc-8301/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/cdc-8302.service, deploy_dir=/tidb-deploy/cdc-8302, data_dir=[/tidb-data/cdc-8302], log_dir=/tidb-deploy/cdc-8302/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/cdc-8300.service, deploy_dir=/tidb-deploy/cdc-8300, data_dir=[/tidb-data/cdc-8300], log_dir=/tidb-deploy/cdc-8300/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20160'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20161'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/tikv-20162'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories=''
+ [ Serial ] - BackupComponent: component=tidb, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tidb-4000
+ [ Serial ] - CopyComponent: component=tidb, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tidb-4000 os=linux, arch=amd64
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20160
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20161
+ [ Serial ] - BackupComponent: component=tikv, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/tikv-20162
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20160 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20161 os=linux, arch=amd64
+ [ Serial ] - CopyComponent: component=tikv, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/tikv-20162 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tidb-4000.service, deploy_dir=/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb-deploy/tidb-4000/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tiflash-9000.service, deploy_dir=/tidb-deploy/tiflash-9000, data_dir=[/tidb-data/tiflash-9000], log_dir=/tidb-deploy/tiflash-9000/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tikv-20161.service, deploy_dir=/tidb-deploy/tikv-20161, data_dir=[/tidb-data/tikv-20161], log_dir=/tidb-deploy/tikv-20161/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tikv-20162.service, deploy_dir=/tidb-deploy/tikv-20162, data_dir=[/tidb-data/tikv-20162], log_dir=/tidb-deploy/tikv-20162/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/tikv-20160.service, deploy_dir=/tidb-deploy/tikv-20160, data_dir=[/tidb-data/tikv-20160], log_dir=/tidb-deploy/tikv-20160/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - Mkdir: host=192.168.169.40, directories='/tidb-data/prometheus-9090'
+ [ Serial ] - Mkdir: host=192.168.169.40, directories=''
+ [ Serial ] - BackupComponent: component=grafana, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/grafana-3000
+ [ Serial ] - CopyComponent: component=grafana, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/grafana-3000 os=linux, arch=amd64
+ [ Serial ] - BackupComponent: component=prometheus, currentVersion=v8.5.1, remote=192.168.169.40:/tidb-deploy/prometheus-9090
+ [ Serial ] - CopyComponent: component=prometheus, version=v9.0.0-beta.1.pre-nightly, remote=192.168.169.40:/tidb-deploy/prometheus-9090 os=linux, arch=amd64
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/grafana-3000.service, deploy_dir=/tidb-deploy/grafana-3000, data_dir=[], log_dir=/tidb-deploy/grafana-3000/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
+ [ Serial ] - InitConfig: cluster=tidb-test, user=tidb, host=192.168.169.40, path=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache/prometheus-9090.service, deploy_dir=/tidb-deploy/prometheus-9090, data_dir=[/tidb-data/prometheus-9090], log_dir=/tidb-deploy/prometheus-9090/log, cache_dir=/root/.tiup/storage/cluster/clusters/tidb-test/config-cache
deploy monitored
- Deploy node_exporter -> 192.168.169.40 ... Done
- Deploy blackbox_exporter -> 192.168.169.40 ... Done
refresh monitored config
- Generate config node_exporter -> 192.168.169.40 ... Done
- Generate config blackbox_exporter -> 192.168.169.40 ... Done
+ [ Serial ] - UpgradeCluster
Upgrading component tiflash
Restarting instance 192.168.169.40:9000
Restart instance 192.168.169.40:9000 success
Upgrading component cdc
Start drain the capture, address: 192.168.169.40:8300, captureID: 11a04a02-7f4d-439b-88b7-59e1e5fcf22c
Restarting instance 192.168.169.40:8300
Restart instance 192.168.169.40:8300 success
Start drain the capture, address: 192.168.169.40:8302, captureID: 5264fcaf-56b0-4c94-b9b8-3a26310af998
Restarting instance 192.168.169.40:8302
Restart instance 192.168.169.40:8302 success
Start drain the capture, address: 192.168.169.40:8301, captureID: a604fa32-1784-4e71-8a72-5175e7c1c681
Restarting instance 192.168.169.40:8301
Restart instance 192.168.169.40:8301 success
Upgrading component pd
Restarting instance 192.168.169.40:2379
Restart instance 192.168.169.40:2379 success
Upgrading component tikv
Evicting 8 leaders from store 192.168.169.40:20160...
Still waiting for 8 store leaders to transfer...
Still waiting for 8 store leaders to transfer...
Still waiting for 8 store leaders to transfer...
Still waiting for 8 store leaders to transfer...
Still waiting for 8 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Still waiting for 6 store leaders to transfer...
Restarting instance 192.168.169.40:20160
Restart instance 192.168.169.40:20160 success
Evicting 12 leaders from store 192.168.169.40:20161...
Still waiting for 12 store leaders to transfer...
Still waiting for 12 store leaders to transfer...
Restarting instance 192.168.169.40:20161
Restart instance 192.168.169.40:20161 success
Evicting 16 leaders from store 192.168.169.40:20162...
Still waiting for 16 store leaders to transfer...
Still waiting for 16 store leaders to transfer...
Still waiting for 16 store leaders to transfer...
Restarting instance 192.168.169.40:20162
Restart instance 192.168.169.40:20162 success
Upgrading component tidb
Restarting instance 192.168.169.40:4000
Restart instance 192.168.169.40:4000 success
Upgrading component prometheus
Restarting instance 192.168.169.40:9090
Restart instance 192.168.169.40:9090 success
Upgrading component grafana
Restarting instance 192.168.169.40:3000
Restart instance 192.168.169.40:3000 success
Stopping component node_exporter
Stopping instance 192.168.169.40
Stop 192.168.169.40 success
Stopping component blackbox_exporter
Stopping instance 192.168.169.40
Stop 192.168.169.40 success
Starting component node_exporter
Starting instance 192.168.169.40
Start 192.168.169.40 success
Starting component blackbox_exporter
Starting instance 192.168.169.40
Start 192.168.169.40 success
Upgraded cluster `tidb-test` successfully
[root@tidb40 ~]#
[root@tidb40 ~]# tiup cluster display tidb-test
Checking updates for component cluster... Timedout (after 2s)
Cluster type: tidb
Cluster name: tidb-test
Cluster version: v9.0.0-beta.1.pre-nightly
Deploy user: tidb
SSH type: builtin
Dashboard URL: http://192.168.169.40:2379/dashboard
Grafana URL: http://192.168.169.40:3000
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir
-- ---- ---- ----- ------- ------ -------- ----------
192.168.169.40:8300 cdc 192.168.169.40 8300 linux/x86_64 Up /tidb-data/cdc-8300 /tidb-deploy/cdc-8300
192.168.169.40:8301 cdc 192.168.169.40 8301 linux/x86_64 Up /tidb-data/cdc-8301 /tidb-deploy/cdc-8301
192.168.169.40:8302 cdc 192.168.169.40 8302 linux/x86_64 Up /tidb-data/cdc-8302 /tidb-deploy/cdc-8302
192.168.169.40:3000 grafana 192.168.169.40 3000 linux/x86_64 Up - /tidb-deploy/grafana-3000
192.168.169.40:2379 pd 192.168.169.40 2379/2380 linux/x86_64 Up|L|UI /tidb-data/pd-2379 /tidb-deploy/pd-2379
192.168.169.40:9090 prometheus 192.168.169.40 9090/12020 linux/x86_64 Up /tidb-data/prometheus-9090 /tidb-deploy/prometheus-9090
192.168.169.40:4000 tidb 192.168.169.40 4000/10080 linux/x86_64 Up - /tidb-deploy/tidb-4000
192.168.169.40:9000 tiflash 192.168.169.40 9000/3930/20170/20292/8234/8123 linux/x86_64 Up /tidb-data/tiflash-9000 /tidb-deploy/tiflash-9000
192.168.169.40:20160 tikv 192.168.169.40 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
192.168.169.40:20161 tikv 192.168.169.40 20161/20181 linux/x86_64 Up /tidb-data/tikv-20161 /tidb-deploy/tikv-20161
192.168.169.40:20162 tikv 192.168.169.40 20162/20182 linux/x86_64 Up /tidb-data/tikv-20162 /tidb-deploy/tikv-20162
Total nodes: 11