Failed to Create TiDB Cluster

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb创建集群失败

| username: TiDBer_vJpITQ5J

[TiDB Usage Environment] Production Environment
Cluster creation failed, error reported
Please confirm your topology:
Cluster type: tidb
Cluster name: tidb-prod
Cluster version: v6.5.3
Role Host Ports OS/Arch Directories


pd 10.200.78.110 2379/2380 linux/x86_64 /data/tidb-deploy/pd-2379,/data/tidb-data/pd-2379
pd 10.200.78.111 2379/2380 linux/x86_64 /data/tidb-deploy/pd-2379,/data/tidb-data/pd-2379
tikv 10.200.78.130 20160/20180 linux/x86_64 /mnt/tidb-deploy/tikv-20160,/mnt/tidb-data/tikv-20160
tikv 10.200.78.131 20160/20180 linux/x86_64 /mnt/tidb-deploy/tikv-20160,/mnt/tidb-data/tikv-20160
tikv 10.200.78.132 20160/20180 linux/x86_64 /mnt/tidb-deploy/tikv-20160,/mnt/tidb-data/tikv-20160
tikv 10.200.78.133 20160/20180 linux/x86_64 /mnt/tidb-deploy/tikv-20160,/mnt/tidb-data/tikv-20160
tidb 10.200.78.120 4003/10081 linux/x86_64 /mnt/tidb-deploy/tidb-4003
tidb 10.200.78.121 4003/10081 linux/x86_64 /mnt/tidb-deploy/tidb-4003
tiflash 10.200.78.112 9000/8123/3930/20170/20292/8234 linux/x86_64 /data/tidb-deploy/tiflash-9000,/data/tidb-data/tiflash-9000
prometheus 10.200.78.112 9090/12020 linux/x86_64 /data/tidb-deploy/prometheus-8249,/data/tidb-data/prometheus-8249
grafana 10.200.78.112 3000 linux/x86_64 /data/tidb-deploy/grafana-3000
alertmanager 10.200.78.112 9093/9094 linux/x86_64 /data/tidb-deploy/alertmanager-9093,/data/tidb-data/alertmanager-9093
Attention:
1. If the topology is not what you expected, check your yaml file.
2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: (default=N) y

  • Generate SSH keys … Done
  • Download TiDB components
    • Download pd:v6.5.3 (linux/amd64) … Done
    • Download tikv:v6.5.3 (linux/amd64) … Done
    • Download tidb:v6.5.3 (linux/amd64) … Done
    • Download tiflash:v6.5.3 (linux/amd64) … Done
    • Download prometheus:v6.5.3 (linux/amd64) … Done
    • Download grafana:v6.5.3 (linux/amd64) … Done
    • Download alertmanager: (linux/amd64) … Done
    • Download node_exporter: (linux/amd64) … Done
    • Download blackbox_exporter: (linux/amd64) … Done
  • Initialize target host environments
    • Prepare 10.200.78.120:33899 … Done
    • Prepare 10.200.78.121:33899 … Done
    • Prepare 10.200.78.110:33899 … Done
    • Prepare 10.200.78.130:33899 … Done
    • Prepare 10.200.78.132:33899 … Done
    • Prepare 10.200.78.133:33899 … Done
    • Prepare 10.200.78.111:33899 … Done
    • Prepare 10.200.78.131:33899 … Done
    • Prepare 10.200.78.112:33899 … Done
  • Deploy TiDB instance
    • Copy pd → 10.200.78.110 … Done
    • Copy pd → 10.200.78.111 … Done
    • Copy tikv → 10.200.78.130 … Error
    • Copy tikv → 10.200.78.131 … Error
    • Copy tikv → 10.200.78.132 … Error
    • Copy tikv → 10.200.78.133 … Error
    • Copy tidb → 10.200.78.120 … Error
    • Copy tidb → 10.200.78.121 … Error
    • Copy tiflash → 10.200.78.112 … Done
    • Copy prometheus → 10.200.78.112 … Done
    • Copy grafana → 10.200.78.112 … Done
    • Copy alertmanager → 10.200.78.112 … Done
    • Deploy node_exporter → 10.200.78.121 … Done
    • Deploy node_exporter → 10.200.78.110 … Done
    • Deploy node_exporter → 10.200.78.130 … Done
    • Deploy node_exporter → 10.200.78.132 … Done
    • Deploy node_exporter → 10.200.78.133 … Done
    • Deploy node_exporter → 10.200.78.120 … Done
    • Deploy node_exporter → 10.200.78.111 … Done
    • Deploy node_exporter → 10.200.78.131 … Done
    • Deploy node_exporter → 10.200.78.112 … Done
    • Deploy blackbox_exporter → 10.200.78.111 … Done
    • Deploy blackbox_exporter → 10.200.78.131 … Done
    • Deploy blackbox_exporter → 10.200.78.112 … Done
    • Deploy blackbox_exporter → 10.200.78.110 … Done
    • Deploy blackbox_exporter → 10.200.78.130 … Done
    • Deploy blackbox_exporter → 10.200.78.132 … Done
    • Deploy blackbox_exporter → 10.200.78.133 … Done
    • Deploy blackbox_exporter → 10.200.78.120 … Done
    • Deploy blackbox_exporter → 10.200.78.121 … Done

Error: executor.ssh.execute_failed: Failed to execute command over SSH for ‘leboadmin@10.200.78.131:33899’ {ssh_stderr: chown: changing ownership of ‘/mnt/tidb-deploy/tikv-20160/log’: Operation not permitted
, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c “test -d /mnt/tidb-deploy/tikv-20160/log || (mkdir -p /mnt/tidb-deploy/tikv-20160/log && chown leboadmin:$(id -g -n leboadmin) /mnt/tidb-deploy/tikv-20160/log)”}, cause: Process exited with status 1

| username: TiDBer_vJpITQ5J | Original post link

| username: zhanggame1 | Original post link

Please provide the command you created.

| username: TiDBer_vJpITQ5J | Original post link

tiup cluster deploy tidb-prod v6.5.3 /usr/local/tidb/topo.yaml --user leboadmin -i /home/leboadmin/.ssh/k8s_id_rsa

| username: tidb狂热爱好者 | Original post link

The error is quite obvious, the directory permissions are incorrect.

| username: 我是咖啡哥 | Original post link

The leboadmin user does not have permission to change the directory owner. Confirm that the leboadmin user has sudo privileges.

| username: redgame | Original post link

The user does not have sufficient permissions to change file ownership.

| username: Raymond | Original post link

Has the machine 10.200.78.131 configured sudo? Go to this machine and manually execute chown leboadmin.leboadmin /mnt/tidb-deploy/tikv-20160/log using the leboadmin user to see if there are any errors.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.