Tiup Error

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

Original topic: Tiup 报错

| username: 我家有个臭皮崽

When deploying with tiup, an error occurs:

The error is at line 38:

Delete the value at line 38:

Then execute tiup:


No problem.

| username: 啦啦啦啦啦 | Original post link

Check if the settings of location-labels correspond to the keys of TiKV labels.

| username: 会飞的土拨鼠 | Original post link

You need to check the configuration file and see if the indentation in the modified yml file is correct. If the error still exists, you can use a command to regenerate it.

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

Both the location-labels parameter in PD and the labels parameter in TiKV must be configured simultaneously; otherwise, PD will not schedule based on the topology.

The configuration on PD is called location-labels, which is an array of strings. Each item in this configuration corresponds to the key in TiKV labels, and the order of each key represents the hierarchical relationship of different labels (from left to right, the isolation level decreases sequentially).

location-labels has no default value, and you can set it according to specific needs, including zone, rack, host, etc. Additionally, there is no limit on the number of label levels for location-labels (i.e., it is not limited to 3). As long as the levels match the labels of the TiKV servers, the configuration can be successful.

Reference: 通过拓扑 label 进行副本调度 | PingCAP 文档中心

| username: weixiaobing | Original post link

Correct configuration:
server_configs:
pd:
replication.location-labels: [“az”, “replication zone”, “rack”, “host”]

| username: 我家有个臭皮崽 | Original post link

I compared the situations of deleting the value and not deleting the value. After deleting it, there is no problem, but if I don’t delete it, an error occurs. There are no other modifications involved either.

| username: 我家有个臭皮崽 | Original post link

I keep getting syntax errors.

| username: 我家有个臭皮崽 | Original post link

It seems that there is always an error reporting a YAML syntax error. It’s really strange, and the error message is quite ridiculous.

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

The format requirements for this configuration file are quite strict; even an extra or missing space won’t work. Send your parameter file as an attachment so I can take a look.

| username: 我家有个臭皮崽 | Original post link

I deleted the “- host” in this place, and it worked. The deployment is successful now. Thank you.

| username: system | Original post link

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