[FAQ] tiup 启动集群失败,message 中报错:log directory shouldn’t be the subdirectory of data directory

【问题澄清】

  • tiup 启动集群报错,debug 日志中并无并无明显报错信息,在 message 中找到如下信息:

run_pd.sh: [2020/06/09 19:03:21.863 +08:00] [FATAL] [main.go:56] [“parse cmd flags error”] [error=“log directory shouldn’t be the subdirectory of data directory”] errorVerbose=“log directory shouldn’t be the subdirectory of data directory[ngithub.com/pingcap/pd/v4/server/config.(*Config.Validate
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.0/go/src/github.com/pingcap/pd/server/config/config.go:330[ngithub.com/pingcap/pd/v4/server/config.(*Config](http://ngithub.com/pingcap/pd/v4/server/config.(*Config)).Adjust
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.0/go/src/github.com/pingcap/pd/server/config/config.go:396[ngithub.com/pingcap/pd/v4/server/config.(*Config](http://ngithub.com/pingcap/pd/v4/server/config.(*Config)).Parse
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.0/go/src/github.com/pingcap/pd/server/config/config.go:308
main.main
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.0/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:42
runtime.main
\t/usr/local/go/src/runtime/proc.go:203
runtime.goexit
\t/usr/local/go/src/runtime/asm_amd64.s:1357”]

【解决方案】

将 log 目录与 data 目录分开存放,一般 log 目录默认跟随 deploy dir 路径。

【经典案例】