Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: dmctl 命令使用报错
When using dmctl encrypt to encrypt the password, an error occurred. Did I use the wrong syntax?
[root@infra-benc-tidb-ansilbe tidb-community-toolkit-v8.0.0-linux-amd64]# tiup dmctl encrypt 'mysql'
Starting component dmctl: /root/.tiup/components/dmctl/v8.1.0/dmctl/dmctl encrypt mysql
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
dmctl --master-addr=“127.0.0.1:8261” encrypt “your_password_here”
How about executing it in the deployment tool’s location? Have you added the environment variables?
Your DM version and cluster version are different, right? Try using the same version.
Based on the previous posts, it should be missing parameters.
How did you solve it? Please share so that other students can quickly resolve similar issues.
The dmctl installed by tiup defaults to the latest version, while the dm cluster version is manually specified (I specified v7.5.0). Currently, the latest dmctl version is 8.1.0. There are two solutions: either downgrade the dmctl version (download an older version of the tool package) or upgrade the dm cluster version. Additionally, add a 64-bit key file directory path (secret-key-path=xxx) in the dm-master configuration file.
May I ask, what is the purpose of this configuration step?
The new version requires it; otherwise, an error will be reported.
Encountered a problem and just saw the answer, good!
Replace password_to_encrypt
with the password that needs to be encrypted. Add the --master-addr
parameter.