Failed to Create Cluster

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

Original topic: 创建集群失败

| username: TiDBer_kMTvTIEv

[TiDB Usage Environment] Production Environment / Testing / PoC
System: Ubuntu 18.04
[TiDB Version]
7.5.0
[Reproduction Path] What operations were performed when the issue occurred
An error occurred when executing the initialization of the cluster topology file

[Encountered Issue: Issue Phenomenon and Impact]
I just want to use it on the current server, and I don’t know how to write the configuration file


global:
  user: "tidb"
  ssh_port: 22
  deploy_dir: "/tidb-deploy"
  data_dir: "/tidb-data"
  listen_host: 0.0.0.0
  arch: "amd64"

monitored:
 
  node_exporter_port: 9100

  blackbox_exporter_port: 9115
 
pd_servers:
  - host: 127.0.0.1

  

tidb_servers:

  - host: 127.0.0.1
  
tikv_servers:

  - host: 127.0.0.1
  



tiflash_servers:
  - host: 127.0.0.1
  
 
monitoring_servers:
  - host: 127.0.0.1
 
grafana_servers:
  - host: 127.0.0.1

 
| username: 小龙虾爱大龙虾 | Original post link

Write your own IP address, don’t write 127.0.0.1, and the rk user needs to have sudo privileges (without a password), or you can replace the rk user with root.

| username: TiDBer_kMTvTIEv | Original post link

Still not working, I used root and also changed the IP.

| username: 连连看db | Original post link

I tried it, using 127.0.0.1 works. You can execute ssh-keygen, then copy the content of id_rsa.pub to authorized_keys, and execute your deployment command again.

| username: 连连看db | Original post link

Using a key, you can try this method.

| username: 普罗米修斯 | Original post link

SSH also needs to establish passwordless login with the local machine.

| username: TiDBer_kMTvTIEv | Original post link

How to set up passwordless authentication?

| username: TiDBer_kMTvTIEv | Original post link

I tried it and got a permission error. When I used sudo to execute it, it said the command was not found.

| username: 小龙虾爱大龙虾 | Original post link

I want to say, tiup playground, you deserve it :smiley:

| username: TiDBer_kMTvTIEv | Original post link

Isn’t tiup playground a temporary deployment? Is it okay if I use it for a long time?

| username: wangccsy | Original post link

Is the CPU x86 and does not support x64?

| username: TiDBer_kMTvTIEv | Original post link

tiup playground can create and run

| username: 小龙虾爱大龙虾 | Original post link

The key is, who runs TiDB like this, with just one node?

| username: TiDBer_kMTvTIEv | Original post link

Uh, the key is that there is only one local server in use.

| username: 连连看db | Original post link

This is obviously incorrect. The user is rk, but your key is specified under root. You should create a .ssh directory under /home/rk/, then touch authorized_keys in the .ssh directory, and then execute ssh-keygen.

| username: 小龙虾爱大龙虾 | Original post link

What is it used for?

| username: TiDBer_kMTvTIEv | Original post link

Used as a database.

| username: Kongdom | Original post link

Even if you only want to use it locally, you still need to set up passwordless mutual trust.

| username: 小龙虾爱大龙虾 | Original post link

A single machine with MySQL is more convenient :joy_cat:

| username: Jellybean | Original post link

The data from tiup playground can also be used long-term by using the --tag parameter. Each time you start, specify your data directory to reuse the previous data.

  • If you want to persist data, you can use TiUP’s --tag parameter: tiup --tag <your-tag> playground .... For more details, refer to the TiUP Reference Manual.

If you want a new, empty cluster, do not use the --tag parameter.