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

【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】v6.1.1升级到v7.5.0
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】

[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.

日志:

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"}

操作步骤:

--1、解压安装包
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 

--查看当前集群状态
tiup cluster display tidb-xxx


--2、更新 TiUP 离线镜像
version=v7.5.0
sh tidb-community-server-${version}-linux-amd64/local_install.sh
tiup -v
--将 server 和 toolkit 两个离线镜像合并
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

--升级 Cluster 组件
tiup update cluster
tiup -v

--3、检查当前集群的健康状况
tiup cluster check tidb-xxx --cluster

--4、将集群升级到指定版本
tiup cluster upgrade tidb-xxx v7.5.0
--5、升级后验证
tiup cluster display tidb-xxx

执行第四步的时候报错,之前升级其他版本遇到过类似情况,是因为没有merge。这次确定merge了。

执行下:tiup list --all --verbose

组件的版本信息只会在本地无缓存的情况下从镜像服务器获取,可以通过 tiup list <component> 刷新组件列表。

7.5 里没有 tispark 包,去掉 tispark 试试

1 个赞

确实,7.5 里没有 tispark 包了,找了下升级到v6.5.1,这个版本还有tispark的包,升级成功。

tiup cluster upgrade 升级时如何指定不需要升级的组件,比如 tispark、nodeexporter等?

好像不能,没有-R吧

这个情况还蛮具体的,有些有升级包,有些没有升级包

@Damon-PingCAP 这个怎么去掉tispark,蹲个大佬的方法

缩容掉,spark 集群不应该通过 tiup 部署,tiup 里部署 spark 集群只是方便测试用的,与 tidb 集群也没关系。在离线包里 merge 一个包含 tispark 的版本镜像应该也可以。

这个问题确实有点具体了,学习一下。Spark 其实最好是手动部署。

多谢~
我理解错了,我以为是tiup cluster upgrade 升级过程中可以指定组件不升级 :joy:

学习了

学习了,可以先缩容掉,然后再升级

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。