Offline Upgrade from v6.1.1 to v7.5.0 Reports: Error: unknown component

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

Original topic: v6.1.1离线升级到v7.5.0,报:Error: unknown component

| username: 我是咖啡哥

[TiDB Usage Environment] Production Environment / Test / Poc
[TiDB Version] Upgraded from v6.1.1 to v7.5.0
[Reproduction Path] What operations were performed to encounter the issue
[Encountered Issue: Problem Phenomenon and Impact]

[tidb@centos-bsf36cfx tidb-community-server-v7.5.0-linux-amd64]$ tiup cluster upgrade tidb-xxx v7.5.0
tiup is checking updates for component cluster ...
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.14.0/tiup-cluster upgrade tidb-cams v7.5.0
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 v6.1.1 cluster tidb-xxx to v7.5.0:
will upgrade component           "tiflash" to "v7.5.0",
will upgrade component                "pd" to "v7.5.0",
will upgrade component              "tikv" to "v7.5.0",
will upgrade component              "tidb" to "v7.5.0",
will upgrade component        "prometheus" to "v7.5.0",
will upgrade component           "grafana" to "v7.5.0",
will upgrade component      "alertmanager" to "",
will upgrade component           "tispark" to "",
will upgrade component           "tispark" to "",
will upgrade component     "node-exporter" to "",
will upgrade component "blackbox-exporter" to "".
Do you want to continue? [y/N]:(default=N) y
Upgrading cluster...

Error: unknown component

Verbose debug logs has been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2024-02-27-09-23-25.log.

Logs:

2024-02-27T09:23:22.749+0800    INFO    Execute command {"command": "tiup cluster upgrade tidb-xxx v7.5.0"}
2024-02-27T09:23:22.749+0800    DEBUG   Environment variables   {"env": ["TIUP_HOME=/home/tidb/.tiup", "TIUP_USER_INPUT_VERSION=", "TIUP_VERSION=1.14.0", "TIUP_COMPONENT_DATA_DIR=/home/tidb/.tiup/storage/cluster", "TIUP_COMPONENT_INSTALL_DIR=/home/tidb/.tiup/components/cluster/v1.14.0", "TIUP_TELEMETRY_STATUS=disable", "TIUP_TELEMETRY_UUID=cfe6766e-e000-40d1-a88b-1d1bd1901329", "TIUP_TELEMETRY_SECRET=7df9665b472d8083ab637fffb88c12aa", "TIUP_WORK_DIR=/opt/soft/tidb-community-server-v7.5.0-linux-amd64", "TIUP_TAG=U5RhG64", "TIUP_INSTANCE_DATA_DIR=/home/tidb/.tiup/data/U5RhG64", "XDG_SESSION_ID=873748", "HOSTNAME=centos-bsf36cfx", "SHELL=/bin/bash", "TERM=xterm", "HISTSIZE=10000", "USER=tidb", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:", "SUDO_USER=dphqh022484", "SUDO_UID=30022484", "TMOUT=900", "USERNAME=tidb", "PATH=/home/tidb/.tiup/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/home/tidb/.local/bin:/home/tidb/bin", "MAIL=/var/spool/mail/tidb", "PWD=/opt/soft/tidb-community-server-v7.5.0-linux-amd64", "LANG=en_US.UTF-8", "HISTCONTROL=ignoredups", "SHLVL=1", "SUDO_COMMAND=/bin/bash", "HOME=/home/tidb", "LOGNAME=tidb", "LESSOPEN=||/usr/bin/lesspipe.sh %s", "PROMPT_COMMAND=/etc/alert.log", "SUDO_GID=30022484", "HISTTIMEFORMAT=%F %T tidb ", "_=/home/tidb/.tiup/bin/tiup", "OLDPWD=/opt/soft", "TIUP_TELEMETRY_EVENT_UUID=89fccb2e-68ef-434f-a709-693b3d172d40", "TIUP_MIRRORS=/opt/soft/tidb-community-server-v7.5.0-linux-amd64"]}
2024-02-27T09:23:22.753+0800    DEBUG   Initialize repository finished  {"duration": "4.570039ms"}
2024-02-27T09:23:22.755+0800    WARN    ESC[33mBefore 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.ESC[0m
This operation will upgrade tidb ESC[93mv6.1.1ESC[0m cluster ESC[93mtidb-xxxESC[0m to ESC[93mv7.5.0ESC[0m:
will upgrade component           "tiflash" to "v7.5.0",
will upgrade component                "pd" to "v7.5.0",
will upgrade component              "tikv" to "v7.5.0",
will upgrade component              "tidb" to "v7.5.0",
will upgrade component        "prometheus" to "v7.5.0",
will upgrade component           "grafana" to "v7.5.0",
will upgrade component      "alertmanager" to "",
will upgrade component           "tispark" to "",
will upgrade component           "tispark" to "",
will upgrade component     "node-exporter" to "",
will upgrade component "blackbox-exporter" to "".
2024-02-27T09:23:25.627+0800    INFO    Upgrading cluster...
2024-02-27T09:23:25.642+0800    INFO    Execute command finished        {"code": 1, "error": "unknown component", "errorVerbose": "unknown component\ngithub.com/pingcap/tiup/pkg/repository.init\n\tgithub.com/pingcap/tiup/pkg/repository/mirror.go:56\nruntime.doInit1\n\truntime/proc.go:6740\nruntime.doInit\n\truntime/proc.go:6707\nruntime.main\n\truntime/proc.go:249\nruntime.goexit\n\truntime/asm_amd64.s:1650"}

Steps:

--1. Unzip the installation package
cd /opt/soft/

tar -zxvf tidb-community-server-v7.5.0-linux-amd64.tar.gz 
tar -zxvf tidb-community-toolkit-v7.5.0-linux-amd64.tar.gz 

--Check the current cluster status
tiup cluster display tidb-xxx


--2. Update TiUP offline mirror
version=v7.5.0
sh tidb-community-server-${version}-linux-amd64/local_install.sh
tiup -v
--Merge the server and toolkit offline mirrors
ls -ld tidb-community-server-${version}-linux-amd64 tidb-community-toolkit-${version}-linux-amd64
cd tidb-community-server-${version}-linux-amd64/
cp -rp keys ~/.tiup/
tiup mirror merge ../tidb-community-toolkit-${version}-linux-amd64

--Upgrade Cluster components
tiup update cluster
tiup -v

--3. Check the current cluster health status
tiup cluster check tidb-xxx --cluster

--4. Upgrade the cluster to the specified version
tiup cluster upgrade tidb-xxx v7.5.0
--5. Verify after the upgrade
tiup cluster display tidb-xxx

An error occurred during the fourth step. Similar issues were encountered in previous upgrades due to not merging. This time, merging was confirmed.

| username: 小龙虾爱大龙虾 | Original post link

Execute: tiup list --all --verbose

| username: TiDBer_小阿飞 | Original post link

The version information of the component will only be retrieved from the image server when there is no local cache. You can refresh the component list using tiup list <component>.

| username: Damon-PingCAP | Original post link

There is no tispark package in 7.5, try removing tispark.

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

Indeed, there is no tispark package in version 7.5. I found that upgrading to v6.5.1 still includes the tispark package, and the upgrade was successful.

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

How do you specify components that do not need to be upgraded, such as tispark and nodeexporter, when upgrading with tiup cluster upgrade?

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

It seems not, there is no -R, right?

| username: WinterLiu | Original post link

This situation is quite specific; some have upgrade packages, and some do not have upgrade packages.

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

@Damon-PingCAP How do I remove tispark? Waiting for an expert’s method.

| username: Damon-PingCAP | Original post link

Scale down, the Spark cluster should not be deployed through TiUP. The Spark cluster deployment in TiUP is only for convenient testing and has nothing to do with the TiDB cluster. Merging a version image that includes TiSpark in the offline package should also work.

| username: TiDBer_CQ | Original post link

This question is indeed quite specific, need to study it. Actually, it’s best to deploy Spark manually.

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

Thanks~
I misunderstood, I thought it was possible to specify components not to upgrade during the tiup cluster upgrade process :joy:

| username: zhanggame1 | Original post link

Learned.

| username: lemonade010 | Original post link

Got it, you can scale down first, and then upgrade.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.