3.0.2升级 4.0 错误

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:

【TiDB 版本】
v3.0.2
【问题描述】
升级4.0出现错误:

2021-03-17T16:38:26.947+0800 INFO Execute command finished {“code”: 1, “error”: “init config failed: 192.168.5.160:4000: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.5.160:22’ {ssh_stderr: , ssh_stdout: [2021/03/17 16:38:09.363 +08:00] [FATAL] [terror.go:348] [“unexpected error”] [error=“config file /data/tidb/deploy/conf/tidb.toml contained unknown configuration options: log.file.log-rotate, pessimistic-txn.default, pessimistic-txn.ttl, txn-local-latches, txn-local-latches.capacity, txn-local-latches.enabled”] [stack=“github.com/pingcap/log.Fatal\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/pkg/mod/github.com/pingcap/log@v0.0.0-20200511115504-543df19646ad/global.go:59\ github.com/pingcap/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200623164729-3a18f1e5dceb/terror/terror.go:348\ github.com/pingcap/tidb/config.InitializeConfig\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/src/github.com/pingcap/tidb/config/config.go:752\ main.main\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/src/github.com/pingcap/tidb/tidb-server/main.go:168\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:203”]\ , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin /data/tidb/deploy/bin/tidb-server --config-check --config=/data/tidb/deploy/conf/tidb.toml }, cause: Process exited with status 1: check config failed”, “errorVerbose”: “check config failed\ executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.5.160:22’ {ssh_stderr: , ssh_stdout: [2021/03/17 16:38:09.363 +08:00] [FATAL] [terror.go:348] [“unexpected error”] [error=“config file /data/tidb/deploy/conf/tidb.toml contained unknown configuration options: log.file.log-rotate, pessimistic-txn.default, pessimistic-txn.ttl, txn-local-latches, txn-local-latches.capacity, txn-local-latches.enabled”] [stack=“github.com/pingcap/log.Fatal\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/pkg/mod/github.com/pingcap/log@v0.0.0-20200511115504-543df19646ad/global.go:59\ github.com/pingcap/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200623164729-3a18f1e5dceb/terror/terror.go:348\ github.com/pingcap/tidb/config.InitializeConfig\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/src/github.com/pingcap/tidb/config/config.go:752\ main.main\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/src/github.com/pingcap/tidb/tidb-server/main.go:168\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:203”]\ , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin /data/tidb/deploy/bin/tidb-server --config-check --config=/data/tidb/deploy/conf/tidb.toml }, cause: Process exited with status 1\ngithub.com/pingcap/tiup/pkg/cluster/spec.checkConfig\ \tgithub.com/pingcap/tiup@/pkg/cluster/spec/server_config.go:268\ github.com/pingcap/tiup/pkg/cluster/spec.(*TiDBInstance).InitConfig\ \tgithub.com/pingcap/tiup@/pkg/cluster/spec/tidb.go:199\ github.com/pingcap/tiup/pkg/cluster/task.(*InitConfig).Execute\ \tgithub.com/pingcap/tiup@/pkg/cluster/task/init_config.go:49\ github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute\ \tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:196\ github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1\ \tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:241\ runtime.goexit\ \truntime/asm_amd64.s:1357\ init config failed: 192.168.5.160:4000”}


若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

请看下这个帖子是否有帮助:

1、只有/home/tidb/.tiup/storage/cluster/clusters/test-cluster/config-cache目录
2、删除config_cache目录下tidb*.toml中的以下参数:
log.file.log-rotate,
pessimistic-txn.default,
pessimistic-txn.ttl,
txn-local-latches,
txn-local-latches.capacity,
txn-local-latches.enabled
删除后,运行再次运行 tiup cluster upgrade test-cluster v4.0.3 报错:
Error: init config failed: 192.168.5.160:4000: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.5.160:22’ {ssh_stderr: , ssh_stdout: [2021/03/17 17:17:20.982 +08:00] [FATAL] [terror.go:348] [“unexpected error”] [error=“config file /data/tidb/deploy/conf/tidb.toml contained unknown configuration options: log.file.log-rotate, pessimistic-txn.default, pessimistic-txn.ttl, txn-local-latches, txn-local-latches.capacity, txn-local-latches.enabled”] [stack=“github.com/pingcap/log.Fatal\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/pkg/mod/github.com/pingcap/log@v0.0.0-20200511115504-543df19646ad/global.go:59\ github.com/pingcap/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200623164729-3a18f1e5dceb/terror/terror.go:348\ github.com/pingcap/tidb/config.InitializeConfig\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/src/github.com/pingcap/tidb/config/config.go:752\ main.main\ \t/home/jenkins/agent/workspace/tidb_v4.0.3/go/src/github.com/pingcap/tidb/tidb-server/main.go:168\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:203”]
, ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin /data/tidb/deploy/bin/tidb-server --config-check --config=/data/tidb/deploy/conf/tidb.toml }, cause: Process exited with status 1: check config failed

Verbose debug logs has been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2021-03-17-17-17-51.log.

查看那个tidb*.toml文件中的参数,又恢复了

1、你那里在升级时,是将 ansible 的 meta 导入到了 tiup ,然后再使用 tiup 升级遇到的了报错吧
2、如果是,请到 /home/tidb/.tiup/storage/cluster/clusters/{cluster_name}/backup 目录下,检查下 meta_xxxx_.yaml 文件看下是否有这些参数,如果有,那么请删除~
3、请 tiup cluster edit-config {cluster_name} 看下是否有报错日志中的这些参数,如果有,请删除 ~

上面的操作完成后,请重试升级 ~

1、是将ansible导入tiup升级的
2、已删除
3、已删除那些参数。
再次升级,还是报错,错误信息没有变化 。

  1. home/tidb/.tiup/storage/cluster/clusters/{cluster_name}/backup 下的 meta.yaml
  2. tiup cluster edit-config {cluster_name}
  3. 请把最新的 tiup 报错 log 上传下

辛苦上传下 ~~

meta-2021-03-18T14:33:22.201909407 08:00.yaml (5.4 KB)
tiup-cluster edit-config test-cluster.txt (5.1 KB)

辛苦把最新的 tiup 报错 log 上传下 ~

tiup-cluster-debug-2021-03-18-14-28-41.log (87.1 KB)

您那里删除对应 meta.yaml 中的相应参数后,是否做了 reload 操作?

目前 tidb server 的 config 文件中仍然有这些参数的哈 ?

执行了tiup cluster reload test-cluster 后,再次升级,报错依旧。。。。

这个请确认下,如果文件中有报错参数请将该配置文件中的报错参数删除,再次查看下

辛苦上传下报错日志

1、我使用tiup cluster edit-config test-cluster 查看参数,没有那些报错的参数
tiup-cluster-debug-2021-03-18-15-15-38.log (87.1 KB)

不是 tiup cluster edit-config test-cluster ,是 tidb server 的 config 文件哈,比如:

/data/tidb/deploy/conf/tidb.toml

已解决。
1、去除/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ansible-imported-configs/tidb-192.168.5.160-4000.toml 中的那些报错参数。
2、tiup cluster reload test-cluster
3、再次升级

:+1:

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