Error in Deploying 7.2, Installation Failed

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

Original topic: 部署7.2报错,无法成功安装

| username: TiDBer_ELDgsoWY

[TiDB Usage Environment] / Test / Poc
[TiDB Version] 7.2
Refer to the document TiDB Software and Hardware Environment Recommended Configuration | PingCAP Documentation Center to simulate the deployment of a production environment cluster on a single machine.
When executing
tiup cluster deploy milkyway v7.2.0 tidb-topology.yaml --user tidb -p, the following error occurred. How can this problem be resolved?

The configuration of tidb-topology.yaml is as follows:

global:
  user: "tidb"
  ssh_port: 22
  deploy_dir: "/data/tidb/deploy"
  data_dir: "/data/tidb/data"

monitored:
  node_exporter_port: 9100
  blackbox_exporter_port: 9115

server_configs:
  tidb:
    log.slow-threshold: 300
  tikv:
    readpool.storage.use-unified-pool: false
    readpool.coprocessor.use-unified-pool: true
  pd:
    replication.enable-placement-rules: true
    replication.location-labels: ["host"]
  tiflash:
    logger.level: "info"

pd_servers:
  - host: 127.0.0.1

tidb_servers:
  - host: 127.0.0.1

tikv_servers:
  - host: 127.0.0.1
    port: 20160
    status_port: 20180
    config:
      server.labels: { host: "logic-host-1" }

  - host: 127.0.0.1
    port: 20161
    status_port: 20181
    config:
      server.labels: { host: "logic-host-2" }

  - host: 127.0.0.1
    port: 20162
    status_port: 20182
    config:
      server.labels: { host: "logic-host-3" }

tiflash_servers:
  - host: 127.0.0.1

monitoring_servers:
  - host: 127.0.0.1

grafana_servers:
  - host: 127.0.0.1

[Resource Configuration]

+ Detect CPU Arch Name
  - Detecting node xxx.xxx.xxx.xxx Arch info ... Error

Error: failed to fetch cpu-arch or kernel-name: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@xxx.xxx.xxx.xxx:22' {ssh_stderr: We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
sudo: no tty present and no askpass program specified
, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c "uname -m"}, cause: Process exited with status 1
| username: zhanggame1 | Original post link

I suggest --user use the root user, and the tidb user will be automatically added to each machine.

| username: 像风一样的男子 | Original post link

Has 7.2 been released???

| username: ShawnYan | Original post link

Has this environment previously deployed TiDB? What machine and what system?

| username: TiDBer_ELDgsoWY | Original post link

New machine, not yet deployed.

| username: TiDBer_ELDgsoWY | Original post link

It is a cluster environment simulated by deploying multiple instances on a single machine.

| username: ShawnYan | Original post link

There are no issues with the OS or CPU, so let’s check the SSH configuration.

| username: tidb菜鸟一只 | Original post link

Has the TiDB user been created? Has sudo permission been granted?

| username: zhanggame1 | Original post link

Try using root first.

| username: redgame | Original post link

Ensure that your SSH connection settings are correct and that you can successfully connect to the target host.

| username: buptzhoutian | Original post link

TiUP does not support interactive input of the sudo password.

Using --user tidb here means that the tidb user already exists on the server. If not, this parameter is incorrectly specified.

| username: Hi70KG | Original post link

:grinning: For a single-machine simulated cluster, definitely use root, otherwise, various permissions are difficult to handle.

| username: zhouzeru | Original post link

This error is usually caused by TiUP being unable to properly obtain the current user’s permissions when executing commands remotely, resulting in the inability to execute commands that require administrator privileges.

To resolve this issue, you can try the following steps:

  1. Confirm whether the current user has sudo privileges: Execute the sudo -l command in the local terminal to check if the current user has sudo privileges and which commands can be executed.
  2. Confirm whether TiUP has sudo privileges: Execute the tiup sudo command in the local terminal to check if TiUP has sudo privileges and which commands can be executed.
  3. Add the current user to the sudoers file: If the current user does not have sudo privileges, you need to add them to the sudoers file. You can use the following command to add the current user to the sudoers file:
sudo echo 'username ALL=(ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers

Replace username with the current username. This command will add the current user to the sudoers file and allow them to execute any command that requires administrator privileges.

  1. Confirm whether the remote host supports sudo: If the above steps do not resolve the issue, you need to confirm whether the remote host supports the sudo command. If the remote host does not have sudo installed or the sudoers file is not configured, TiUP will not be able to execute commands via sudo, and you will need to manually execute the required commands on the remote host.
| username: cassblanca | Original post link

Is it a cloud host? Generally, cloud hosts may not allow the use of port 22 for SSH.

| username: Billmay表妹 | Original post link

Are you asking about ChatGPT?

| username: ShawnYan | Original post link

Is there such a command?

$ tiup sudo
tiup is checking updates for component sudo ...timeout(2s)!
The component `sudo` version is not installed; downloading from repository.
The component `sudo` not found (may be deleted from repository); skipped
Error: use `tiup install sudo` to install component `sudo` first: component not installed

$ tiup install sudo
The component `sudo` not found (may be deleted from repository); skipped
| username: buptzhoutian | Original post link

That answer sounds a bit like AI, it’s unreliable.

| username: zhanggame1 | Original post link

It seems like AI doesn’t know the answer and is making things up.

| username: system | Original post link

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