缩容tiflash,再扩容tiflash,tiflash状态为down

vmware,CentOS7.7, 在从来未部署过tiflash的机上扩容tiflash,执行完扩容命令后检查新tiflash节点,状态正常为up。然后缩容该tiflash节点,再扩容该节点,显示扩容成功,但状态为down。
试了几次,只要是从未部署过tiflash的节点,就能扩容成功;只要是缩容过然后再扩容的tiflash节点,状态为down。
开始以为是版本问题,但从v4.0.0-rc升级到v4.0.0-rc.1之后,还是同样的问题。

  1. 这个和之前问的扩容问题,不知道是否类似?
  2. 尝试先手工创建用户,再扩容试试?

不一样的,不是独立的tiflash节点,是和tikv或者tidb的节点混合部署的,在扩容flash之前已有tidb用户。

好的,我先自己测试下,看看能否复现问题,多谢

[root@localhost home]# systemctl status tiflash-9000 ● tiflash-9000.service - tiflash service Loaded: loaded (/etc/systemd/system/tiflash-9000.service; enabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since 一 2020-05-25 13:04:59 CST; 2s ago Process: 24290 ExecStart=/home/tidb/tidb_cluster/tidb-deploy/tiflash-9000/scripts/run_tiflash.sh (code=exited, status=70) Main PID: 24290 (code=exited, status=70)

5月 25 13:04:59 localhost.localdomain systemd[1]: Unit tiflash-9000.service entered failed state. 5月 25 13:04:59 localhost.localdomain systemd[1]: tiflash-9000.service failed. [root@localhost home]#

你好,

烦请提供下 tiflash deploy dir 下的所有日志,这边分析下,目前通过 systemctl 反馈不能判断出什么

tiflash_tikv.log (1.1 MB) tiflash_error.log (3.2 MB)

你好,

查看下该文件的权限问题?是否为部署用户权限

[root@localhost page_124_0]# pwd /home/tidb/tidb_cluster/tidb-data/tiflash-9000/data/t_61/log/page_124_0

[root@localhost page_124_0]# ll

总用量 0 -rw-r–r-- 1 root root 0 5月 25 13:03 meta

-rw-r–r-- 1 root root 0 5月 25 13:03 page

[root@localhost page_124_0]#

ok

看所属为 root 改成 tidb 即可

ps:确保 /home/tidb/tidb_cluster/ 目录下均为 tidb 用户权限,可以统一刷新下

StartFlash.log (20.7 KB)

改了所属的用户,还是不行

tiflash.log.new (4.3 MB)

您好,请问能否提供一下 tiflash.log 所在目录的所有 log?可以打包发一下。

另外,所使用的的 cluster 版本也请提供一下。

我简单猜测一下,我认为问题应该在于缩容后,TiFlash 组件是不会删除旧的数据文件的。这时你如果扩容在同一个目录下会出现问题。可以确认一下是否是这样。

tiflash.zip (2.0 MB)
版本是: v4.0.0-rc.1

您好,能确认一下缩容 tiflash 之后,旧数据文件是否残留?

另外,请提供所使用的的 tiup 版本。可以使用 tiup list --refresh 查看

tiup cluster -v

Starting component `cluster`: /root/.tiup/components/cluster/v0.6.2/cluster -v
tiup version v0.6.0 (Unknown/Unknown) go1.13

[root@localhost home]# tiup list --refresh

Available components (Last Modified: 2020-02-27T15:20:35+08:00):
Name        Installed           Platforms                             Description
----        ---------           ---------                             -----------
tidb                            darwin/amd64,linux/amd64,linux/arm64  TiDB is an open source distributed HTAP database compatible with the MySQL protocol
playground                      darwin/amd64,linux/amd64              Bootstrap a local TiDB cluster
client                          darwin/amd64,linux/amd64              A simple mysql client to connect TiDB
package                         darwin/amd64,linux/amd64              A toolbox to package tiup component
cluster     YES(v0.5.0,v0.6.2)  darwin/amd64,linux/amd64              Deploy a TiDB cluster for production
mirrors                         darwin/amd64,linux/amd64              Build a local mirrors and download all selected components
bench                           darwin/amd64,linux/amd64              Benchmark database with different workloads
ctl                             darwin/amd64,linux/amd64,linux/arm64  

看上去这 tiup cluster 是你用一个 v0.6.0 的魔改版本覆盖了 v0.6.2 的版本么?如果不是有意这样的话,可以直接尝试卸载这个魔改版本并更新最新的版本

不是故意这样干的,我也不知道为什么这样子