dmctl 报错

【 TiDB 使用环境】生产环境 or 测试环境 or POC
【 TiDB 版本】
【遇到的问题】
【复现路径】做过哪些操作出现的问题
【问题现象及影响】
tiup dmctl:v6.1.0-alpha-nightly-20220520

The component dmctl version v6.1.0-alpha-nightly-20220520 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/dmctl-v6.1.0-alpha-nightly-20220520-linux-amd64.tar.gz 40.30 MiB / 40.30 MiB 100.00% 642.61 KiB/s
Starting component dmctl: /root/.tiup/components/dmctl/v6.1.0-alpha-nightly-20220520/dmctl/dmctl /root/.tiup/components/dmctl/v6.1.0-alpha-nightly-20220520/dmctl/dmctl
Error: --master-addr not provided, this parameter is required when interacting with the dm-master, you can also use environment variable ‘DM_MASTER_ADDR’ to specify the value. Use dmctl --help to see more help messages

[root@tidb1 ~]# ll /root/.tiup/components/dmctl/v6.1.0-alpha-nightly-20220520/dmctl/dmctl
-rwxr-xr-x 1 root root 101547545 May 21 10:29 /root/.tiup/components/dmctl/v6.1.0-alpha-nightly-20220520/dmctl/dmc

[root@tidb1 ~]# ls dmctl-v6.1.0-alpha-nightly-20220520-linux-amd64.tar.gz
dmctl-v6.1.0-alpha-nightly-20220520-linux-amd64.tar.gz
[root@tidb1 ~]# tar -xvf dmctl-v6.1.0-alpha-nightly-20220520-linux-amd64.tar.gz
dmctl/
dmctl/conf/
dmctl/conf/dm_worker.rules.yml
dmctl/scripts/
dmctl/scripts/DM-Monitor-Professional.json
dmctl/scripts/DM-Monitor-Standard.json
dmctl/dmctl
[root@tidb1 ~]# cd dmctl/
[root@tidb1 dmctl]# ll
total 99180
drwxr-xr-x 2 wnag wnag 4096 May 20 23:39 conf
-rwxr-xr-x 1 wnag wnag 101547545 May 20 23:39 dmctl
drwxr-xr-x 2 wnag wnag 4096 May 20 23:39 scripts
[root@tidb1 dmctl]# ls
conf dmctl scripts
[root@tidb1 dmctl]# cd dmct^C
[root@tidb1 dmctl]#
[root@tidb1 dmctl]# ll
total 99180
drwxr-xr-x 2 wnag wnag 4096 May 20 23:39 conf
-rwxr-xr-x 1 wnag wnag 101547545 May 20 23:39 dmctl
drwxr-xr-x 2 wnag wnag 4096 May 20 23:39 scripts
[root@tidb1 dmctl]# ./dmctl -h
DM control

Usage:
dmctl [flags]
dmctl [command]

Available Commands:
binlog manage or show binlog operations
binlog-schema manage or show table schema in schema tracker
check-task Checks the configuration file of the task
config manage config operations
decrypt Decrypts cipher text to plain text
encrypt Encrypts plain text to cipher text
help Gets help about any command
list-member Lists member information
offline-member Offlines member which has been closed
operate-leader evict/cancel-evict the leader
operate-source create/update/stop/show upstream MySQL/MariaDB source
pause-relay Pauses DM-worker’s relay unit
pause-task Pauses a specified running task or all (sub)tasks bound to a source
purge-relay Purges relay log files of the DM-worker according to the specified filename
query-status Queries task status
resume-relay Resumes DM-worker’s relay unit
resume-task Resumes a specified paused task or all (sub)tasks bound to a source
shard-ddl-lock maintain or show shard-ddl locks information
start-relay Starts workers pulling relay log for a source
start-task Starts a task as defined in the configuration file
stop-relay Stops workers pulling relay log for a source
stop-task Stops a specified task or all (sub)tasks bound to a source
transfer-source Transfers a upstream MySQL/MariaDB source to a free worker

Flags:
–config string Path to config file.
-h, --help help for dmctl
–master-addr string Master API server address, this parameter is required when interacting with the dm-master
–rpc-timeout string RPC timeout, default is 10m. (default “10m”)
-s, --source strings MySQL Source ID.
–ssl-ca string Path of file that contains list of trusted SSL CAs for connection.
–ssl-cert string Path of file that contains X509 certificate in PEM format for connection.
–ssl-key string Path of file that contains X509 key in PEM format for connection.
-V, --version Prints version and exit.

Use “dmctl [command] --help” for more information about a command.
[root@tidb1 dmctl]# tiup ./dmctl -encry ‘mysql’
tiup is checking updates for component ./dmctl …timeout!
Error: unknown component
[root@tidb1 dmctl]# pwd
/root/dmctl
[root@tidb1 dmctl]# cd
[root@tidb1 ~]# vi .bash_profile
[root@tidb1 ~]#
[root@tidb1 ~]# . .bash_profile
[root@tidb1 ~]# tiup dmctl -encry ‘mysql’
tiup is checking updates for component dmctl …
Starting component dmctl: /root/.tiup/components/dmctl/v6.0.0/dmctl/dmctl /root/.tiup/components/dmctl/v6.0.0/dmctl/dmctl -encry mysql
Error: unknown command “mysql” for “dmctl”
Run ‘dmctl --help’ for usage.
[root@tidb1 ~]#
[root@tidb1 ~]# cat .bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export PATH=/root/.tiup/bin:$PATH
export PATH=/root/.tiup/bin:$PATH:/mysql/app/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/mysql/.local/bin:/mysql/bin:/root/tidb-toolkit-v5.0.1-linux-amd64/bin:/root/dmctl
#export PATH=/root/.tiup/bin:$PATH:/mysql/app/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/mysql/.local/bin:/mysql/bin:/root/tidb-toolkit-v5.0.1-linux-amd64/bin
#export PATH=/mysql/app/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/mysql/.local/bin:/mysql/bin

【附件】

请提供各个组件的 version 信息,如 cdc/tikv,可通过执行 cdc version/tikv-server --version 获取。

需要指定–master-addr参数

加密是用encrypt参数

1 个赞

已解决。谢谢

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